0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-09-29 22:37:47 +00:00

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
This commit is contained in:
Marco Wahl 2019-08-29 17:28:58 +02:00
parent 3c24be0945
commit 48da60f47a

View file

@ -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