Commit fa4fdb5c authored by Juri Linkov's avatar Juri Linkov

* src/image.c (imagemagick_load_image): Move `MagickSetResolution' down

after the `MagickPingImage' call.

Fixes: debbugs:10112
parent 82727ea4
2011-11-24 Juri Linkov <juri@jurta.org>
* image.c (imagemagick_load_image): Move `MagickSetResolution' down
after the `MagickPingImage' call. (Bug#10112)
2011-11-23 Chong Yidong <cyd@gnu.org>
* window.c (Fcoordinates_in_window_p): Accept only live windows.
......
......@@ -7618,7 +7618,7 @@ imagemagick_load_image (struct frame *f, struct image *img,
image = image_spec_value (img->spec, QCindex, NULL);
ino = INTEGERP (image) ? XFASTINT (image) : 0;
ping_wand = NewMagickWand ();
MagickSetResolution (ping_wand, 2, 2);
if (filename != NULL)
{
status = MagickPingImage (ping_wand, filename);
......@@ -7628,6 +7628,8 @@ imagemagick_load_image (struct frame *f, struct image *img,
status = MagickPingImageBlob (ping_wand, contents, size);
}
MagickSetResolution (ping_wand, 2, 2);
if (! (0 <= ino && ino < MagickGetNumberImages (ping_wand)))
{
image_error ("Invalid image number `%s' in image `%s'",
......
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