From 48da60f47a77f4b99b4160fa620f258896ff4da3 Mon Sep 17 00:00:00 2001 From: Marco Wahl Date: Thu, 29 Aug 2019 17:28:58 +0200 Subject: [PATCH] org: Relax dependance on imagemagick for image width setting * lisp/org.el (org-display-inline-images): Don't depend on image type imagemagick for rescaling. When imagemagick is available use that type at image creation. Reported by Terje Larsen. https://lists.gnu.org/archive/html/emacs-orgmode/2019-08/msg00303.html --- lisp/org.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index ea2c75130..db957a112 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -16729,7 +16729,6 @@ boundaries." (let ((width ;; Apply `org-image-actual-width' specifications. (cond - ((not (image-type-available-p 'imagemagick)) nil) ((eq org-image-actual-width t) nil) ((listp org-image-actual-width) (or @@ -16749,14 +16748,15 @@ boundaries." ;; Otherwise, fall-back to provided number. (car org-image-actual-width))) ((numberp org-image-actual-width) - org-image-actual-width))) + org-image-actual-width) + (t nil))) (old (get-char-property-and-overlay (org-element-property :begin link) 'org-image-overlay))) (if (and (car-safe old) refresh) (image-refresh (overlay-get (cdr old) 'display)) (let ((image (create-image file - (and width 'imagemagick) + (and (image-type-available-p 'imagemagick) 'imagemagick) nil :width width))) (when image