cvs: gd /libgd/src gd_png.c

From: Date: Fri, 13 Mar 2009 15:50:38 +0000
Subject: cvs: gd /libgd/src gd_png.c
Groups: php.gd.cvs 
Request: Send a blank email to php-gd-cvs+get-577@lists.php.net to get a copy of this message
tabe Fri Mar 13 15:50:38 2009 UTC Modified files: /gd/libgd/src gd_png.c Log: ref FS#176: surround with #ifdef PNG_pHYs_SUPPORTED. http://cvs.php.net/viewvc.cgi/gd/libgd/src/gd_png.c?r1=1.27&r2=1.28&diff_format=u Index: gd/libgd/src/gd_png.c diff -u gd/libgd/src/gd_png.c:1.27 gd/libgd/src/gd_png.c:1.28 --- gd/libgd/src/gd_png.c:1.27 Sun Mar 8 09:16:04 2009 +++ gd/libgd/src/gd_png.c Fri Mar 13 15:50:38 2009 @@ -1,4 +1,4 @@ -/* $Id: gd_png.c,v 1.27 2009/03/08 09:16:04 tabe Exp $ */ +/* $Id: gd_png.c,v 1.28 2009/03/13 15:50:38 tabe Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -232,6 +232,7 @@ } #endif +#ifdef PNG_pHYs_SUPPORTED /* check if the resolution is specified */ if (png_get_valid(png_ptr, info_ptr, PNG_INFO_pHYs)) { if (png_get_pHYs(png_ptr, info_ptr, &res_x, &res_y, &unit_type)) { @@ -243,6 +244,7 @@ } } } +#endif switch (color_type) { case PNG_COLOR_TYPE_PALETTE: @@ -571,9 +573,11 @@ /* 2.0.12: this is finally a parameter */ png_set_compression_level (png_ptr, level); +#ifdef PNG_pHYs_SUPPORTED /* 2.1.0: specify the resolution */ png_set_pHYs(png_ptr, info_ptr, DPI2DPM(im->res_x), DPI2DPM(im->res_y), PNG_RESOLUTION_METER); +#endif /* can set this to a smaller value without compromising compression if all * image data is 16K or less; will save some decoder memory [min == 8] */

« previous php.gd.cvs (#577) next »