Jambunathan K <kjambunat...@gmail.com> writes: > Andreas Leha <andreas.l...@med.uni-goettingen.de> 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.
Hi Jambunathan, thanks for digging into this not-so-straight-forward issue. And for the detailed explanation. I do indeed have imagemagick in my load path and the imagemagick-only solution works fine in the cases I tried. Thanks. - Andreas