[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [ODT] image scaling overridden by long caption
From: |
Jambunathan K |
Subject: |
Re: [O] [ODT] image scaling overridden by long caption |
Date: |
Tue, 31 Jan 2012 10:29:08 +0530 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (windows-nt) |
Andreas Leha <address@hidden> writes:
>>> #+label: fig:baz
>>> #+name: baz
>>> #+attr_odt: :scale 0.5
>>> #+header: :file baz.png
>>> #+header: :width 7200 :height 3600 :res 600
>>> #+begin_src R :exports results :results graphics
>>> plot(1:10, 1:10)
>>> #+end_src
Image that R outputs is 7200-by-3600.
>> #+begin_src emacs-lisp
>> (list (* max-image-size (frame-pixel-width))
>> (* max-image-size (frame-pixel-height)))
>> #+end_src
>
> #+results:
> | 3648.0 | 4320.0 |
Emacs will "refuse to load" images that cannot fit in 3640-by-4320
area. Note that max-image dimensions is "tightly coupled" with the frame
size.
>> #+begin_src emacs-lisp
>> (message "%S" (ignore-errors
>> (image-size (create-image "baz.png") 'pixels)))
>> #+end_src
>
> #+results:
> : (30 . 30)
Instead of loading a large image, Emacs tries to create a "safe"
30-by-30 pixel area (whatver it is).
The solution is to instruct Emacs to handle higher image sizes. Just
bump the value of max-image-size. For example, add this to init file.
#+begin_src emacs-lisp
(setq max-image-size (* 2 max-image-size)) ;; modify scale
#+end_src
Side note:
==========
If you have imagemagick on your machine(s) and "identify" program is in
your load path,
#+begin_src emacs-lisp
(executable-find "identify")
#+end_src
you can configure ODT export to use imagemagick as primary source for
probing image dimensions. This you can do by adding the following to
your .emacs.
#+begin_src emacs-lisp
(setq org-export-odt-image-size-probe-method '(imagemagick force))
#+end_src
Ps: If you happen to try out imagemagick-only setting, let me know if
you run in to any issues. You will be the first person (that I know of)
to try it out.
--
[O] Side-by-side support (was:Re: [ODT] image scaling overridden by long caption), Christian Wittern, 2012/01/22