1 // Copyright 2012 Google Inc. All Rights Reserved.
2 //
3 // Use of this source code is governed by a BSD-style license
4 // that can be found in the COPYING file in the root of the source
5 // tree. An additional intellectual property rights grant can be found
6 // in the file PATENTS. All contributing project authors may
7 // be found in the AUTHORS file in the root of the source tree.
8 // -----------------------------------------------------------------------------
9 //
10 // TIFF decode.
11 
12 #ifndef WEBP_IMAGEIO_TIFFDEC_H_
13 #define WEBP_IMAGEIO_TIFFDEC_H_
14 
15 #include "webp/types.h"
16 
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20 
21 struct Metadata;
22 struct WebPPicture;
23 
24 // Reads a TIFF from 'data', returning the decoded output in 'pic'.
25 // Output is RGBA or YUVA, depending on pic->use_argb value.
26 // If 'keep_alpha' is true and the TIFF has an alpha channel, the output is RGBA
27 // or YUVA. Otherwise, alpha channel is dropped and output is RGB or YUV.
28 // Returns true on success.
29 int ReadTIFF(const uint8_t* const data, size_t data_size,
30              struct WebPPicture* const pic, int keep_alpha,
31              struct Metadata* const metadata);
32 
33 #ifdef __cplusplus
34 }    // extern "C"
35 #endif
36 
37 #endif  // WEBP_IMAGEIO_TIFFDEC_H_
38