emacs-orgmode
[Top][All Lists]
Advanced

[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: Fri, 27 Jan 2012 20:10:52 +0530
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (windows-nt)

Hello Andreas

Andreas Leha <address@hidden> writes:
> But I experienced another issue with respect to images scaling in the odt
> export:
>
> This subtree:
>
> ======== test.org ==========================
> * Test image scaling in odt
> #+caption: bar
> #+label: fig:bar
> #+name: bar
> #+attr_odt: :width 8
> #+header: :file bar.png
> #+header: :width 7200 :height 3600 :res 600
> #+begin_src R :exports results :results graphics
>   plot(1:10, 1:10)
> #+end_src
> #+caption: baz
> #+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
> ======================================
>
> exports to this: http://i.imgur.com/sUHQi.png on my system.

I am on a Netbook and I am unable to create "big" images. This is the
following error I get when export the above snippet.

,---- "*Org-Babel Error Output*"
| Error in png(filename = "baz.png", height = 3600, res = 600, width = 7200) : 
|   unable to start device
| Calls: <Anonymous> -> <Anonymous> -> png -> .External
| In addition: Warning messages:
| 1: In png(filename = "baz.png", height = 3600, res = 600, width = 7200) :
|   Unable to allocate bitmap
| 2: In png(filename = "baz.png", height = 3600, res = 600, width = 7200) :
|   opening device failed
| Execution halted
`----

If I reduce the dimensions of the above images, I see that the ODT
output is along expected lines.

I imagine that for some reasons, the ODT exporter has trouble figuring
out the image dimensions of the second image.

Btw, can you post the outputs of the following forms:

#+begin_src emacs-lisp
  (list (* max-image-size (frame-pixel-width)) 
        (* max-image-size (frame-pixel-height)))
#+end_src

#+begin_src emacs-lisp
    (message "%S" (ignore-errors 
                    (image-size (create-image "bar.png") 'pixels)))
    (message "%S" (ignore-errors 
                    (image-size (create-image "baz.png") 'pixels)))
#+end_src

If you can also post the output of the XML created in your machines, I
would be able to infer what could be happening. 

You can access the XML with:

open odt file in archive-mode: C-x b test.odt or C-x C-f test.odt
open content.xml             : ENTER on content.xml
search for .png              : C-s .png

Post the snippets for both 001.png and 002.png

-- 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]