summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/pdftexdir/writepng.c
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2011-05-12 08:17:23 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2011-05-12 08:17:23 +0000
commitbe50c2a909259fedd9732d3419478ca731aec660 (patch)
treed7d0a44cbf7ca89fe9280dc11fc4f10c08073272 /Build/source/texk/web2c/pdftexdir/writepng.c
parent4c5256d4f51b7a5022c0adf849b743f71024f078 (diff)
Build fix for (installed) libpng < 1.5.0
git-svn-id: svn://tug.org/texlive/trunk@22436 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/pdftexdir/writepng.c')
-rw-r--r--Build/source/texk/web2c/pdftexdir/writepng.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/Build/source/texk/web2c/pdftexdir/writepng.c b/Build/source/texk/web2c/pdftexdir/writepng.c
index 9ad2fcbdf30..555773ba57c 100644
--- a/Build/source/texk/web2c/pdftexdir/writepng.c
+++ b/Build/source/texk/web2c/pdftexdir/writepng.c
@@ -499,6 +499,10 @@ void write_png(integer img)
boolean png_copy = true;
double gamma = 0.0;
png_fixed_point int_file_gamma = 0;
+#ifndef PNG_FP_1
+ /* for libpng < 1.5.0 */
+#define PNG_FP_1 100000
+#endif
int i;
integer palette_objnum = 0;
png_colorp palette;
@@ -557,7 +561,7 @@ void write_png(integer img)
|| png_get_color_type(png_ptr(img), png_info(img)) == PNG_COLOR_TYPE_RGB)
&& !fixedimageapplygamma
&& (!png_get_valid(png_ptr(img), png_info(img), PNG_INFO_gAMA)
- || int_file_gamma== PNG_FP_1)
+ || int_file_gamma == PNG_FP_1)
&& !png_get_valid(png_ptr(img), png_info(img),
PNG_INFO_cHRM | PNG_INFO_iCCP | PNG_INFO_sBIT | PNG_INFO_sRGB
| PNG_INFO_bKGD | PNG_INFO_hIST | PNG_INFO_tRNS | PNG_INFO_sPLT)