diff options
Diffstat (limited to 'src/image.c')
| -rw-r--r-- | src/image.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/image.c b/src/image.c index 047f7517501..f7c3ef52563 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -8368,6 +8368,7 @@ imagemagick_load_image (struct frame *f, struct image *img, | |||
| 8368 | #endif /* HAVE_MAGICKEXPORTIMAGEPIXELS */ | 8368 | #endif /* HAVE_MAGICKEXPORTIMAGEPIXELS */ |
| 8369 | { | 8369 | { |
| 8370 | size_t image_height; | 8370 | size_t image_height; |
| 8371 | double color_scale = 65535.0 / QuantumRange; | ||
| 8371 | 8372 | ||
| 8372 | /* Try to create a x pixmap to hold the imagemagick pixmap. */ | 8373 | /* Try to create a x pixmap to hold the imagemagick pixmap. */ |
| 8373 | if (!image_create_x_image_and_pixmap (f, img, width, height, 0, | 8374 | if (!image_create_x_image_and_pixmap (f, img, width, height, 0, |
| @@ -8408,9 +8409,9 @@ imagemagick_load_image (struct frame *f, struct image *img, | |||
| 8408 | PixelGetMagickColor (pixels[x], &pixel); | 8409 | PixelGetMagickColor (pixels[x], &pixel); |
| 8409 | XPutPixel (ximg, x, y, | 8410 | XPutPixel (ximg, x, y, |
| 8410 | lookup_rgb_color (f, | 8411 | lookup_rgb_color (f, |
| 8411 | pixel.red, | 8412 | color_scale * pixel.red, |
| 8412 | pixel.green, | 8413 | color_scale * pixel.green, |
| 8413 | pixel.blue)); | 8414 | color_scale * pixel.blue)); |
| 8414 | } | 8415 | } |
| 8415 | } | 8416 | } |
| 8416 | DestroyPixelIterator (iterator); | 8417 | DestroyPixelIterator (iterator); |