1 // Copyright 2012 Google Inc. All Rights Reserved.
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 // -----------------------------------------------------------------------------
10 #ifndef WEBP_EXAMPLES_PNGDEC_H_
11 #define WEBP_EXAMPLES_PNGDEC_H_
15 #if defined(__cplusplus) || defined(c_plusplus)
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);
29 #if defined(__cplusplus) || defined(c_plusplus)
33 #endif // WEBP_EXAMPLES_PNGDEC_H_