# HG changeset patch # User Gerd Moellmann # Date 941490314 0 # Node ID 65861669b3937874fbeb92c5a4d85844fa44a19c # Parent 81cd0c225dd9f4b23fb26b1eec04dd1d17c2ae08 (png_load) [PNG_READ_sRGB_SUPPORTED]: Put code using png_get_sRGB in #ifdef. diff -r 81cd0c225dd9 -r 65861669b393 src/xfns.c --- 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