diff options
author | Lars Magne Ingebrigtsen <larsi@gnus.org> | 2013-08-13 19:45:34 +0200 |
---|---|---|
committer | Lars Magne Ingebrigtsen <larsi@gnus.org> | 2013-08-13 19:45:34 +0200 |
commit | 8259030d684cc11dcaf548a1aea29d7badf921fe (patch) | |
tree | 311bb547de8203a631fbb11cbf0a94987da62905 /lisp/image.el | |
parent | ad75644970a5deccb1d40465e20087f5806ed3df (diff) | |
download | emacs-8259030d684cc11dcaf548a1aea29d7badf921fe.tar.gz |
Enable giving hints to ImageMagick via :content-type
2013-08-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
* image.el (image-content-type-suffixes): New variable.
2013-08-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
* image.c (imagemagick_filename_hint): New function to possibly
apply `image-content-type-suffixes'.
(imagemagick_load_image): Use it.
Diffstat (limited to 'lisp/image.el')
-rw-r--r-- | lisp/image.el | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lisp/image.el b/lisp/image.el index 804dc3af5ea..de69490f5b6 100644 --- a/lisp/image.el +++ b/lisp/image.el @@ -99,6 +99,14 @@ AUTODETECT can be - maybe auto-detect only if the image type is available (see `image-type-available-p').") +(defvar image-content-type-suffixes + '((image/x-icon "ico")) + "Alist of MIME Content-Type headers to file name suffixes. +This is used as a hint by the ImageMagick library when detecting +image types. If `create-image' is called with a :content-type +matching found in this alist, the ImageMagick library will be +told that the data would have this suffix if saved to a file.") + (defcustom image-load-path (list (file-name-as-directory (expand-file-name "images" data-directory)) 'data-directory 'load-path) |