1 /* 2 * Copyright 2015 Google Inc. 3 * 4 * Use of this source code is governed by a BSD-style license that can be 5 * found in the LICENSE file. 6 */ 7 #ifndef SkJpegInfo_DEFINED 8 #define SkJpegInfo_DEFINED 9 10 #include "SkEncodedInfo.h" 11 #include "SkEncodedOrigin.h" 12 #include "SkSize.h" 13 14 /** Returns true if the data seems to be a valid JPEG image with a known colorType. 15 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. 19 */ 20 bool SkGetJpegInfo(const void* data, size_t len, 21 SkISize* size, 22 SkEncodedInfo::Color* colorType, 23 SkEncodedOrigin* orientation); 24 25 #endif // SkJpegInfo_DEFINED 26