From: Juri Linkov <juri@jurta.org>
To: 10112@debbugs.gnu.org
Subject: bug#10112: ImageMagick doesn't display some image formats
Date: Wed, 23 Nov 2011 00:01:07 +0200 [thread overview]
Message-ID: <871usz3jh8.fsf@mail.jurta.org> (raw)
Visiting images whose format is supported by ImageMagick displays
a small empty box.
Read-only formats like .dot have only read-functions, but not write-functions
(the error being "no encode delegate for this image format").
`imagemagick_load_image' calls `MagickPingImage' to read image attributes.
But since before this calls there is an other call to `MagickSetResolution',
`MagickPingImage' assumes that we are going to modify the image, and returns
the `MagickFalse' status.
Removing `MagickSetResolution' cures this problem. but I hesitate to remove it,
because I don't know why it's here. So at least moving `MagickSetResolution'
a few lines below and calling after `MagickPingImage' will allow the read-only
images to be correctly displayed:
=== modified file 'src/image.c'
--- src/image.c 2011-11-21 22:14:28 +0000
+++ src/image.c 2011-11-22 22:01:00 +0000
@@ -7618,7 +7618,6 @@ imagemagick_load_image
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 +7627,8 @@ (at your option) any later version.
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'",
next reply other threads:[~2011-11-22 22:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-22 22:01 Juri Linkov [this message]
2011-11-24 19:09 ` bug#10112: ImageMagick doesn't display some image formats Juri Linkov
2011-11-24 21:42 ` Wolfgang Jenkner
2011-11-24 21:52 ` Wolfgang Jenkner
2011-11-24 22:49 ` Juri Linkov
2011-12-15 23:57 ` Juri Linkov
2012-06-13 23:57 ` Juri Linkov
2014-12-08 23:32 ` Lars Magne Ingebrigtsen
2014-12-09 0:58 ` Juri Linkov
2014-12-09 1:18 ` Lars Magne Ingebrigtsen
2011-12-15 23:32 ` Juri Linkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871usz3jh8.fsf@mail.jurta.org \
--to=juri@jurta.org \
--cc=10112@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.