emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Andreas Leha <andreas.leha@med.uni-goettingen.de>
To: emacs-orgmode@gnu.org
Subject: Re: [ODT] image scaling overridden by long caption
Date: Fri, 27 Jan 2012 23:41:15 +0100	[thread overview]
Message-ID: <87ty3g6a5w.fsf@med.uni-goettingen.de> (raw)
In-Reply-To: 811uqljjij.fsf@gmail.com

Jambunathan K <kjambunathan@gmail.com> writes:

Hi Jambunathan,

thanks for looking into this.  Answer to your questions below

> Hello Andreas
>
> Andreas Leha <andreas.leha@med.uni-goettingen.de> 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

  reply	other threads:[~2012-01-27 22:41 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-18  8:52 [ODT] image scaling overridden by long caption Andreas Leha
2012-01-19 20:03 ` Jambunathan K
2012-01-21 10:18   ` Andreas Leha
2012-01-23 19:53     ` Jambunathan K
2012-01-23 21:20       ` Nicolas Goaziou
2012-02-01  9:16         ` comments and attributes Jambunathan K
2012-02-01 13:04           ` Nicolas Goaziou
2012-02-15  0:03       ` [ODT] image scaling overridden by long caption Andreas Leha
2012-01-27 14:40     ` Jambunathan K
2012-01-27 22:41       ` Andreas Leha [this message]
2012-01-31  4:59         ` Jambunathan K
2012-02-07 10:04           ` Andreas Leha
2012-01-23  1:53   ` Side-by-side support (was:Re: [ODT] image scaling overridden by long caption) Christian Wittern
2012-01-23 16:34     ` Side-by-side support Jambunathan K
2012-01-23 23:51       ` Christian Wittern

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ty3g6a5w.fsf@med.uni-goettingen.de \
    --to=andreas.leha@med.uni-goettingen.de \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).