aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog6
-rw-r--r--src/image.c7
2 files changed, 10 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index d6e21a777c2..29039395374 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
12014-05-21 Paul Eggert <eggert@cs.ucla.edu>
2
3 Don't assume that ImageMagick uses a 16-bit quantum (Bug#17519).
4 * image.c (imagemagick_load_image): Port to hosts that do not use
5 a 16-bit quantum, i.e., QuantumRange does not equal 65535.
6
12014-05-21 Leo Liu <sdl.web@gmail.com> 72014-05-21 Leo Liu <sdl.web@gmail.com>
2 8
3 * fns.c (Fnreverse): Accept strings for SEQ and update doc-string. 9 * fns.c (Fnreverse): Accept strings for SEQ and update doc-string.
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);