2 * Copyright 2015 Google Inc.
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
7 #ifndef SkJpegInfo_DEFINED
8 #define SkJpegInfo_DEFINED
10 #include "include/codec/SkEncodedOrigin.h"
11 #include "include/core/SkSize.h"
12 #include "include/private/SkEncodedInfo.h"
14 /** Returns true if the data seems to be a valid JPEG image with a known colorType.
16 @param [out] size Image size in pixels
17 @param [out] colorType Encoded color type (kGray_Color, kYUV_Color, several others).
18 @param [out] orientation EXIF Orientation of the image.
20 bool SkGetJpegInfo(const void* data, size_t len,
22 SkEncodedInfo::Color* colorType,
23 SkEncodedOrigin* orientation);
25 #endif // SkJpegInfo_DEFINED