[libpng16] Implement eXIf chunk support

This commit is contained in:
Glenn Randers-Pehrson
2017-07-13 11:19:53 -05:00
parent 40943eb67a
commit 68cb0aaee3
17 changed files with 216 additions and 5 deletions

View File

@@ -97,6 +97,8 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.6.31beta05
\fBpng_byte png_get_header_version (png_const_structp \fIpng_ptr\fP\fB);\fP
\fBpng_uint_32 png_get_eXIf (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_bytep \fI*exif\fP\fB);\fP
\fBpng_uint_32 png_get_hIST (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_uint_16p \fI*hist\fP\fB);\fP
\fBpng_uint_32 png_get_iCCP (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_charpp \fP\fIname\fP\fB, int \fP\fI*compression_type\fP\fB, png_bytepp \fP\fIprofile\fP\fB, png_uint_32 \fI*proflen\fP\fB);\fP
@@ -347,6 +349,8 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.6.31beta05
\fBvoid png_set_gray_to_rgb (png_structp \fIpng_ptr\fP\fB);\fP
\fBvoid png_set_eXIf (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_bytep \fIexif\fP\fB);\fP
\fBvoid png_set_hIST (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_16p \fIhist\fP\fB);\fP
\fBvoid png_set_iCCP (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_const_charp \fP\fIname\fP\fB, int \fP\fIcompression_type\fP\fB, png_const_bytep \fP\fIprofile\fP\fB, png_uint_32 \fIproflen\fP\fB);\fP
@@ -1963,6 +1967,11 @@ png_set_rgb_to_gray()).
the single transparent color for
non-paletted images (PNG_INFO_tRNS)
png_get_eXIf(png_ptr, info_ptr, &exif);
(PNG_INFO_eXIf)
exif - Exif profile (array of png_byte)
png_get_hIST(png_ptr, info_ptr, &hist);
(PNG_INFO_hIST)
@@ -3008,6 +3017,7 @@ your application instead of by libpng, you can use
PNG_INFO_gAMA, PNG_INFO_sBIT,
PNG_INFO_cHRM, PNG_INFO_PLTE,
PNG_INFO_tRNS, PNG_INFO_bKGD,
PNG_INFO_eXIf,
PNG_INFO_hIST, PNG_INFO_pHYs,
PNG_INFO_oFFs, PNG_INFO_tIME,
PNG_INFO_pCAL, PNG_INFO_sRGB,
@@ -3607,6 +3617,11 @@ width, height, bit_depth, and color_type must be the same in each call.
single transparent color for
non-paletted images (PNG_INFO_tRNS)
png_set_eXIf(png_ptr, info_ptr, exif);
hist - Exif profile (array of
png_byte) (PNG_INFO_eXIf)
png_set_hIST(png_ptr, info_ptr, hist);
hist - histogram of palette (array of
@@ -5715,6 +5730,11 @@ is an error. Previously this requirement of the PNG specification was not
enforced, and the palette was always limited to 256 entries. An over-length
PLTE chunk found in an input PNG is silently truncated.
Starting with libpng-1.6.31, the eXIf chunk is supported. Libpng does not
attempt to decode the Exif profile; it simply returns a byte array
containing the profile to the calling application which must do its own
decoding.
.SH XIII. Detecting libpng
The png_get_io_ptr() function has been present since libpng-0.88, has never