OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 #ifndef SkJpegInfo_DEFINED | 7 #ifndef SkJpegInfo_DEFINED |
8 #define SkJpegInfo_DEFINED | 8 #define SkJpegInfo_DEFINED |
9 | 9 |
10 class SkData; | 10 class SkData; |
11 | 11 |
12 struct SkJFIFInfo { | 12 struct SkJFIFInfo { |
13 int fWidth; | 13 int fWidth; |
14 int fHeight; | 14 int fHeight; |
15 enum Type { | 15 enum Type { |
16 kGrayscale, | 16 kGrayscale, |
17 kYCbCr, | 17 kYCbCr, |
18 } fType; | 18 } fType; |
19 }; | 19 }; |
20 | 20 |
21 /** Returns true iff the data seems to be a valid JFIF JPEG image. | 21 /** Returns true iff the data seems to be a valid JFIF JPEG image. |
22 If so and if info is not NULL, populate info. | 22 If so and if info is not nullptr, populate info. |
23 | 23 |
24 JPEG/JFIF References: | 24 JPEG/JFIF References: |
25 http://www.w3.org/Graphics/JPEG/itu-t81.pdf | 25 http://www.w3.org/Graphics/JPEG/itu-t81.pdf |
26 http://www.w3.org/Graphics/JPEG/jfif3.pdf | 26 http://www.w3.org/Graphics/JPEG/jfif3.pdf |
27 */ | 27 */ |
28 bool SkIsJFIF(const SkData* skdata, SkJFIFInfo* info); | 28 bool SkIsJFIF(const SkData* skdata, SkJFIFInfo* info); |
29 | 29 |
30 #endif // SkJpegInfo_DEFINED | 30 #endif // SkJpegInfo_DEFINED |
OLD | NEW |