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);
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'",
}
/* 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);
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. */