changeset 26293:65861669b393

(png_load) [PNG_READ_sRGB_SUPPORTED]: Put code using png_get_sRGB in #ifdef.
author Gerd Moellmann <gerd@gnu.org>
date Mon, 01 Nov 1999 21:05:14 +0000
parents 81cd0c225dd9
children b1d85e2a1cae
files src/xfns.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/xfns.c	Mon Nov 01 19:04:46 1999 +0000
+++ b/src/xfns.c	Mon Nov 01 21:05:14 1999 +0000
@@ -8155,10 +8155,13 @@
 
   /* Tell the PNG lib to handle gamma correction for us.  */
 
+#if defined(PNG_READ_sRGB_SUPPORTED) || defined(PNG_WRITE_sRGB_SUPPORTED)
   if (png_get_sRGB (png_ptr, info_ptr, &intent))
     /* There is a special chunk in the image specifying the gamma.  */
     png_set_sRGB (png_ptr, info_ptr, intent);
-  else if (png_get_gAMA (png_ptr, info_ptr, &image_gamma))
+  else
+#endif
+  if (png_get_gAMA (png_ptr, info_ptr, &image_gamma))
     /* Image contains gamma information.  */
     png_set_gamma (png_ptr, screen_gamma, image_gamma);
   else