From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Leha Subject: Re: [ODT] image scaling overridden by long caption Date: Fri, 27 Jan 2012 23:41:15 +0100 Message-ID: <87ty3g6a5w.fsf@med.uni-goettingen.de> References: <87aa5lwfxm.fsf@med.uni-goettingen.de> <81pqefv4r9.fsf@gmail.com> <87r4yt9x5u.fsf@med.uni-goettingen.de> <811uqljjij.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:39751) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RquUM-0007Gg-1d for emacs-orgmode@gnu.org; Fri, 27 Jan 2012 17:41:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RquUH-0002Jv-6r for emacs-orgmode@gnu.org; Fri, 27 Jan 2012 17:41:45 -0500 Received: from lo.gmane.org ([80.91.229.12]:37484) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RquUG-0002Ja-R2 for emacs-orgmode@gnu.org; Fri, 27 Jan 2012 17:41:41 -0500 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RquUD-0005dS-Lb for emacs-orgmode@gnu.org; Fri, 27 Jan 2012 23:41:37 +0100 Received: from vpn-2120.gwdg.de ([134.76.2.120]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 27 Jan 2012 23:41:37 +0100 Received: from andreas.leha by vpn-2120.gwdg.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 27 Jan 2012 23:41:37 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Jambunathan K writes: Hi Jambunathan, thanks for looking into this. Answer to your questions below > Hello Andreas > > Andreas Leha 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: -> -> 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 Figure 1: bar Figure 2: baz #+end_html Best, Andreas