aboutsummaryrefslogtreecommitdiff
path: root/src/pdf/SkJpegInfo.h
blob: 736575d42f2d6050ed25456edbf7d5e1d9d2d796 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*
 * Copyright 2015 Google Inc.
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */
#ifndef SkJpegInfo_DEFINED
#define SkJpegInfo_DEFINED

#include "include/codec/SkEncodedOrigin.h"
#include "include/private/SkEncodedInfo.h"

#include <cstddef>

struct SkISize;

/** Returns true if the data seems to be a valid JPEG image with a known colorType.

    @param [out] size        Image size in pixels
    @param [out] colorType   Encoded color type (kGray_Color, kYUV_Color, several others).
    @param [out] orientation EXIF Orientation of the image.
*/
bool SkGetJpegInfo(const void* data, size_t len,
                   SkISize* size,
                   SkEncodedInfo::Color* colorType,
                   SkEncodedOrigin* orientation);

#endif  // SkJpegInfo_DEFINED