]> code.delx.au - gnu-emacs/blobdiff - src/image.c
Merge from trunk.
[gnu-emacs] / src / image.c
index fd842f3e347eeaa8d881e7c0622ce0883c79881b..736c1b3472f0dbf74f0505a43789ab5004c1a380 100644 (file)
@@ -7619,7 +7619,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);
@@ -7629,6 +7629,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'",
@@ -7755,7 +7757,7 @@ imagemagick_load_image (struct frame *f, struct image *img,
     }
 
   /* Finally we are done manipulating the image.  Figure out the
-     resulting width/height and transfer ownerwship to Emacs.  */
+     resulting width/height and transfer ownership to Emacs.  */
   height = MagickGetImageHeight (image_wand);
   width = MagickGetImageWidth (image_wand);
 
@@ -7787,7 +7789,7 @@ imagemagick_load_image (struct frame *f, struct image *img,
           goto imagemagick_error;
         }
 
-      /* Copy imagegmagick image to x with primitive yet robust pixel
+      /* Copy imagemagick image to x with primitive yet robust pixel
          pusher loop.  This has been tested a lot with many different
          images.  */