mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-08-24 23:02:52 +00:00
org-odt.el: Use imagemagick to determine image sizes
* org-odt.el (org-export-odt-image-size-probe-method) (org-odt-do-image-size): Use imagemagick preferentially to determine image sizes. See http://lists.gnu.org/archive/html/emacs-orgmode/2012-02/msg00288.html
This commit is contained in:
parent
4657454381
commit
c195392f59
|
@ -1912,9 +1912,9 @@ ATTR is a string of other attributes of the a element."
|
||||||
target-file))
|
target-file))
|
||||||
|
|
||||||
(defvar org-export-odt-image-size-probe-method
|
(defvar org-export-odt-image-size-probe-method
|
||||||
'(emacs imagemagick force)
|
(append (and (executable-find "identify") '(imagemagick)) ; See Bug#10675
|
||||||
"Ordered list of methods by for determining size of an embedded
|
'(emacs fixed))
|
||||||
image.")
|
"Ordered list of methods for determining image sizes.")
|
||||||
|
|
||||||
(defvar org-export-odt-default-image-sizes-alist
|
(defvar org-export-odt-default-image-sizes-alist
|
||||||
'(("as-char" . (5 . 0.4))
|
'(("as-char" . (5 . 0.4))
|
||||||
|
@ -1941,7 +1941,8 @@ ATTR is a string of other attributes of the a element."
|
||||||
(pixels-to-cms (cdr size-in-pixels)))))))
|
(pixels-to-cms (cdr size-in-pixels)))))))
|
||||||
(case probe-method
|
(case probe-method
|
||||||
(emacs
|
(emacs
|
||||||
(size-in-cms (ignore-errors (clear-image-cache)
|
(size-in-cms (ignore-errors ; Emacs could be in batch mode
|
||||||
|
(clear-image-cache)
|
||||||
(image-size (create-image file) 'pixels))))
|
(image-size (create-image file) 'pixels))))
|
||||||
(imagemagick
|
(imagemagick
|
||||||
(size-in-cms
|
(size-in-cms
|
||||||
|
|
Loading…
Reference in a new issue