summaryrefslogtreecommitdiff
path: root/src/xfns.c
diff options
context:
space:
mode:
authorGerd Moellmann <gerd@gnu.org>1999-11-01 21:05:14 +0000
committerGerd Moellmann <gerd@gnu.org>1999-11-01 21:05:14 +0000
commit6c1aa34da0d29a6471cf9de13f77081c92b127dc (patch)
tree88d67e6a272acae81e15bed920fcc7394ad0283b /src/xfns.c
parent8dc78b523c00e3718da9a4ef028c9f2e6ccfc827 (diff)
downloademacs-6c1aa34da0d29a6471cf9de13f77081c92b127dc.tar.gz
(png_load) [PNG_READ_sRGB_SUPPORTED]: Put code using
png_get_sRGB in #ifdef.
Diffstat (limited to 'src/xfns.c')
-rw-r--r--src/xfns.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/xfns.c b/src/xfns.c
index 77615a78ac1..7ab5de9c1c7 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -8155,10 +8155,13 @@ png_load (f, img)
/* 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