diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/xfns.c | 5 |
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) | |||
| 8155 | 8155 | ||
| 8156 | /* Tell the PNG lib to handle gamma correction for us. */ | 8156 | /* Tell the PNG lib to handle gamma correction for us. */ |
| 8157 | 8157 | ||
| 8158 | #if defined(PNG_READ_sRGB_SUPPORTED) || defined(PNG_WRITE_sRGB_SUPPORTED) | ||
| 8158 | if (png_get_sRGB (png_ptr, info_ptr, &intent)) | 8159 | if (png_get_sRGB (png_ptr, info_ptr, &intent)) |
| 8159 | /* There is a special chunk in the image specifying the gamma. */ | 8160 | /* There is a special chunk in the image specifying the gamma. */ |
| 8160 | png_set_sRGB (png_ptr, info_ptr, intent); | 8161 | png_set_sRGB (png_ptr, info_ptr, intent); |
| 8161 | else if (png_get_gAMA (png_ptr, info_ptr, &image_gamma)) | 8162 | else |
| 8163 | #endif | ||
| 8164 | if (png_get_gAMA (png_ptr, info_ptr, &image_gamma)) | ||
| 8162 | /* Image contains gamma information. */ | 8165 | /* Image contains gamma information. */ |
| 8163 | png_set_gamma (png_ptr, screen_gamma, image_gamma); | 8166 | png_set_gamma (png_ptr, screen_gamma, image_gamma); |
| 8164 | else | 8167 | else |