summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Wahl <marcowahlsoft@gmail.com>2019-08-29 17:28:58 +0200
committerMarco Wahl <marcowahlsoft@gmail.com>2019-08-29 17:28:58 +0200
commit48da60f47a77f4b99b4160fa620f258896ff4da3 (patch)
treebbfe50ecc5c2a15408abb1c44f3bd353dd848226
parent3c24be094516b1db4e4f77923bf65f1d17ef9218 (diff)
downloadorg-mode-48da60f47a77f4b99b4160fa620f258896ff4da3.tar.gz
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
-rw-r--r--lisp/org.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/org.el b/lisp/org.el
index ea2c751..db957a1 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