[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: |
Andreas Leha |
Subject: |
Re: [O] [ODT] image scaling overridden by long caption |
Date: |
Fri, 27 Jan 2012 23:41:15 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) |
Jambunathan K <address@hidden> writes:
Hi Jambunathan,
thanks for looking into this. Answer to your questions below
> 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
#+results:
| 3648.0 | 4320.0 |
> #+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
#+results:
: (30 . 30)
>
> 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
#+begin_html
<text:p text:style-name="Text_20_body">
<draw:frame draw:style-name="OrgImageCaptionFrame" svg:width="8.00cm"
text:anchor-type="paragraph"><draw:text-box fo:min-height="8.00cm"><text:p
text:style-name="Illustration"><draw:frame draw:style-name="OrgCaptionedImage"
svg:width="8.00cm" svg:height="8.00cm" style:rel-width="100%"
style:rel-height="scale" text:anchor-type="paragraph"><draw:image
xlink:href="Images/0001.png" xlink:type="simple" xlink:show="embed"
xlink:actuate="onLoad"/></draw:frame>Figure <text:sequence
text:ref-name="fig:bar" text:name="Figure" text:formula="ooow:Figure+1"
style:num-format="1">1</text:sequence>:
bar</text:p></draw:text-box></draw:frame>
</text:p>
<text:p text:style-name="Text_20_body">
<draw:frame draw:style-name="OrgImageCaptionFrame" svg:width="0.53cm"
text:anchor-type="paragraph"><draw:text-box fo:min-height="0.53cm"><text:p
text:style-name="Illustration"><draw:frame draw:style-name="OrgCaptionedImage"
svg:width="0.53cm" svg:height="0.53cm" style:rel-width="100%"
style:rel-height="scale" text:anchor-type="paragraph"><draw:image
xlink:href="Images/0002.png" xlink:type="simple" xlink:show="embed"
xlink:actuate="onLoad"/></draw:frame>Figure <text:sequence
text:ref-name="fig:baz" text:name="Figure" text:formula="ooow:Figure+1"
style:num-format="1">2</text:sequence>:
baz</text:p></draw:text-box></draw:frame>
</text:p>
#+end_html
Best,
Andreas
[O] Side-by-side support (was:Re: [ODT] image scaling overridden by long caption), Christian Wittern, 2012/01/22