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

after the `MagickPingImage' call.

Fixes: debbugs:10112
This commit is contained in:
Juri Linkov 2011-11-24 21:02:39 +02:00
parent 82727ea451
commit fa4fdb5ca5
2 changed files with 8 additions and 1 deletions

View file

@ -1,3 +1,8 @@
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.

View file

@ -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'",