diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2017-07-27 20:38:00 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2017-07-27 20:38:00 +0000 |
commit | 1eaf921900a3d76fd3daf0e53dc8cf23de15cb72 (patch) | |
tree | 46300a71eb2747c63cc15fcd788cff292b46a8e4 /Build/source/libs/libpng/libpng-src/pngwutil.c | |
parent | bdf3513abe506a554215a51797aa9251b3069b6c (diff) |
libpng-1.6.31
git-svn-id: svn://tug.org/texlive/trunk@44898 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/libpng/libpng-src/pngwutil.c')
-rw-r--r-- | Build/source/libs/libpng/libpng-src/pngwutil.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/Build/source/libs/libpng/libpng-src/pngwutil.c b/Build/source/libs/libpng/libpng-src/pngwutil.c index dd800586be6..348bb524ddf 100644 --- a/Build/source/libs/libpng/libpng-src/pngwutil.c +++ b/Build/source/libs/libpng/libpng-src/pngwutil.c @@ -1473,6 +1473,37 @@ png_write_bKGD(png_structrp png_ptr, png_const_color_16p back, int color_type) } #endif +#ifdef PNG_WRITE_eXIf_SUPPORTED +/* Write the Exif data */ +void /* PRIVATE */ +png_write_eXIf(png_structrp png_ptr, png_bytep exif, int num_exif) +{ + int i; + png_byte buf[3]; + + png_debug(1, "in png_write_eXIf"); + + if (num_exif > (int)png_ptr->num_exif) + { + png_debug2(3, "num_exif = %d, png_ptr->num_exif = %d", num_exif, + png_ptr->num_exif); + + png_warning(png_ptr, "Invalid number of exif bytes specified"); + return; + } + + png_write_chunk_header(png_ptr, png_eXIf, (png_uint_32)(num_exif)); + + for (i = 0; i < num_exif; i++) + { + buf[i] = exif[i]; + png_write_chunk_data(png_ptr, buf, (png_size_t)1); + } + + png_write_chunk_end(png_ptr); +} +#endif + #ifdef PNG_WRITE_hIST_SUPPORTED /* Write the histogram */ void /* PRIVATE */ |