New comit of SDL2
[supertux.git] / src / SDL2 / external / libwebp-0.3.0 / examples / pngdec.h
1 // Copyright 2012 Google Inc. All Rights Reserved.
2 //
3 // This code is licensed under the same terms as WebM:
4 //  Software License Agreement:  http://www.webmproject.org/license/software/
5 //  Additional IP Rights Grant:  http://www.webmproject.org/license/additional/
6 // -----------------------------------------------------------------------------
7 //
8 // PNG decode.
9
10 #ifndef WEBP_EXAMPLES_PNGDEC_H_
11 #define WEBP_EXAMPLES_PNGDEC_H_
12
13 #include <stdio.h>
14
15 #if defined(__cplusplus) || defined(c_plusplus)
16 extern "C" {
17 #endif
18
19 struct Metadata;
20 struct WebPPicture;
21
22 // Reads a PNG from 'in_file', returning the decoded output in 'pic'.
23 // If 'keep_alpha' is true and the PNG has an alpha channel, the output is RGBA
24 // otherwise it will be RGB.
25 // Returns true on success.
26 int ReadPNG(FILE* in_file, struct WebPPicture* const pic, int keep_alpha,
27             struct Metadata* const metadata);
28
29 #if defined(__cplusplus) || defined(c_plusplus)
30 }    // extern "C"
31 #endif
32
33 #endif  // WEBP_EXAMPLES_PNGDEC_H_