GNU bug report logs - #10746
ImageMagick and priority of image loaders

Previous Next

Package: emacs;

Reported by: Glenn Morris <rgm <at> gnu.org>

Date: Tue, 7 Feb 2012 04:18:02 UTC

Severity: minor

Found in version 24.0.93

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #3 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: submit <at> debbugs.gnu.org
Subject: ImageMagick and priority of image loaders
Date: Mon, 06 Feb 2012 23:16:21 -0500
Package: emacs
Version: 24.0.93

The Emacs Lisp manual used to say (I'm going to comment it out, for the
reasons given in this report):

    There may be overlap between image loaders in your Emacs
    installation, and you may prefer to use a different one for a given
    image type (which loader will be used in practice depends on the
    priority of the loaders). For example, if you never want to use the
    ImageMagick loader to use JPEG files, add @code{JPG} to this list.

Firstly, I don't understand what this means. What does it means for
there to be multiple "image loaders" in Emacs, and how is their priority
determined? (Also, do I have to add JPEG as well, since
imagemagick-types returns both JPG and JPEG?)

I think it might mean, eg jpeg images can be loaded via libjpeg or
ImageMagick. If that is what it means, it could be clearer.

If so, when I view a jpg with Emacs, how can I tell which loader was
used? Maybe from looking at the mode-line in image-mode, which either
says [jpeg] or [imagemagick]?

It seems there's no practical way to control which loader is used:

i) If you compile without jpeg but with ImageMagick, then you simply cannot
view jpegs: http://debbugs.gnu.org/9045

ii) If you compile with both, then libjpeg is always used (AFAICS). This is
despite imagemagick-register-types adding to the front of
image-type-file-name-regexps. When you visit a jpeg file, image-type
first uses image-type-from-file-header to determine the image type, and
this decides it is a jpeg. So imagemagick never gets a change to open
the jpeg. You can make it work by setting image-type-header-regexps to
nil, but that is supposed to be a constant.




This bug report was last modified 5 years and 301 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.