From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jambunathan K Subject: Re: [ODT] image scaling overridden by long caption Date: Tue, 31 Jan 2012 10:29:08 +0530 Message-ID: <8162fszcv7.fsf@gmail.com> References: <87aa5lwfxm.fsf@med.uni-goettingen.de> <81pqefv4r9.fsf@gmail.com> <87r4yt9x5u.fsf@med.uni-goettingen.de> <811uqljjij.fsf@gmail.com> <87ty3g6a5w.fsf@med.uni-goettingen.de> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:39968) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rs5oX-0007ip-Nb for emacs-orgmode@gnu.org; Mon, 30 Jan 2012 23:59:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rs5oT-0001FL-QC for emacs-orgmode@gnu.org; Mon, 30 Jan 2012 23:59:29 -0500 Received: from mail-pz0-f41.google.com ([209.85.210.41]:47524) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rs5oT-0001FF-K9 for emacs-orgmode@gnu.org; Mon, 30 Jan 2012 23:59:25 -0500 Received: by dake40 with SMTP id e40so4544425dak.0 for ; Mon, 30 Jan 2012 20:59:24 -0800 (PST) In-Reply-To: <87ty3g6a5w.fsf@med.uni-goettingen.de> (Andreas Leha's message of "Fri, 27 Jan 2012 23:41:15 +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: Andreas Leha Cc: emacs-orgmode@gnu.org Andreas Leha 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. --