Commit 6c1aa34d authored by Gerd Moellmann's avatar Gerd Moellmann
Browse files

(png_load) [PNG_READ_sRGB_SUPPORTED]: Put code using

png_get_sRGB in #ifdef.
parent 8dc78b52
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment