blob: 82a8a736fd64fb03a8d06d2dfba174ebee8c3da3 [file] [log] [blame]
halcanary96287f72015-05-07 11:46:59 -07001/*
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
Mike Kleinc0bd9f92019-04-23 12:05:21 -050010#include "include/codec/SkEncodedOrigin.h"
11#include "include/core/SkSize.h"
12#include "include/private/SkEncodedInfo.h"
halcanary7a14b312015-10-01 07:28:13 -070013
Hal Canary83e0f1b2018-04-05 16:58:41 -040014/** Returns true if the data seems to be a valid JPEG image with a known colorType.
halcanary96287f72015-05-07 11:46:59 -070015
Hal Canary83e0f1b2018-04-05 16:58:41 -040016 @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.
halcanary96287f72015-05-07 11:46:59 -070019*/
Hal Canary83e0f1b2018-04-05 16:58:41 -040020bool SkGetJpegInfo(const void* data, size_t len,
21 SkISize* size,
22 SkEncodedInfo::Color* colorType,
23 SkEncodedOrigin* orientation);
halcanary96287f72015-05-07 11:46:59 -070024
25#endif // SkJpegInfo_DEFINED