diff options
| author | Stefan Monnier | 2003-05-25 17:46:34 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2003-05-25 17:46:34 +0000 |
| commit | 8972820c930609390ad70db7e20adfbf2a447b7f (patch) | |
| tree | 7482fdd096045fe9671f0670edc24552c12fe8ab /src | |
| parent | 1e7b70b253f43881e3d35523d8aecef794ec2b41 (diff) | |
| download | emacs-8972820c930609390ad70db7e20adfbf2a447b7f.tar.gz emacs-8972820c930609390ad70db7e20adfbf2a447b7f.zip | |
(png_load): Remove `unused vars intent, image_gamma' warning.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xfns.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/src/xfns.c b/src/xfns.c index 107ed6dd3a8..4e66e6ef782 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -7579,8 +7579,7 @@ png_load (f, img) | |||
| 7579 | png_byte channels; | 7579 | png_byte channels; |
| 7580 | png_uint_32 row_bytes; | 7580 | png_uint_32 row_bytes; |
| 7581 | int transparent_p; | 7581 | int transparent_p; |
| 7582 | double screen_gamma, image_gamma; | 7582 | double screen_gamma; |
| 7583 | int intent; | ||
| 7584 | struct png_memory_storage tbr; /* Data to be read */ | 7583 | struct png_memory_storage tbr; /* Data to be read */ |
| 7585 | 7584 | ||
| 7586 | /* Find out what file to load. */ | 7585 | /* Find out what file to load. */ |
| @@ -7719,19 +7718,22 @@ png_load (f, img) | |||
| 7719 | screen_gamma = (f->gamma ? 1 / f->gamma / 0.45455 : 2.2); | 7718 | screen_gamma = (f->gamma ? 1 / f->gamma / 0.45455 : 2.2); |
| 7720 | 7719 | ||
| 7721 | #if 0 /* Avoid double gamma correction for PNG images. */ | 7720 | #if 0 /* Avoid double gamma correction for PNG images. */ |
| 7722 | /* Tell the PNG lib to handle gamma correction for us. */ | 7721 | { /* Tell the PNG lib to handle gamma correction for us. */ |
| 7722 | int intent; | ||
| 7723 | double image_gamma; | ||
| 7723 | #if defined(PNG_READ_sRGB_SUPPORTED) || defined(PNG_WRITE_sRGB_SUPPORTED) | 7724 | #if defined(PNG_READ_sRGB_SUPPORTED) || defined(PNG_WRITE_sRGB_SUPPORTED) |
| 7724 | if (png_get_sRGB (png_ptr, info_ptr, &intent)) | 7725 | if (png_get_sRGB (png_ptr, info_ptr, &intent)) |
| 7725 | /* The libpng documentation says this is right in this case. */ | 7726 | /* The libpng documentation says this is right in this case. */ |
| 7726 | png_set_gamma (png_ptr, screen_gamma, 0.45455); | 7727 | png_set_gamma (png_ptr, screen_gamma, 0.45455); |
| 7727 | else | 7728 | else |
| 7728 | #endif | 7729 | #endif |
| 7729 | if (png_get_gAMA (png_ptr, info_ptr, &image_gamma)) | 7730 | if (png_get_gAMA (png_ptr, info_ptr, &image_gamma)) |
| 7730 | /* Image contains gamma information. */ | 7731 | /* Image contains gamma information. */ |
| 7731 | png_set_gamma (png_ptr, screen_gamma, image_gamma); | 7732 | png_set_gamma (png_ptr, screen_gamma, image_gamma); |
| 7732 | else | 7733 | else |
| 7733 | /* Use the standard default for the image gamma. */ | 7734 | /* Use the standard default for the image gamma. */ |
| 7734 | png_set_gamma (png_ptr, screen_gamma, 0.45455); | 7735 | png_set_gamma (png_ptr, screen_gamma, 0.45455); |
| 7736 | } | ||
| 7735 | #endif /* if 0 */ | 7737 | #endif /* if 0 */ |
| 7736 | 7738 | ||
| 7737 | /* Handle alpha channel by combining the image with a background | 7739 | /* Handle alpha channel by combining the image with a background |