emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* bug#10675: 24.0.92; (image-size ...) on "large" images
  2012-01-31  5:51 24.0.92; (image-size ...) on "large" images Jambunathan K
@ 2002-01-01  0:47 ` Jambunathan K
  0 siblings, 0 replies; 2+ messages in thread
From: Jambunathan K @ 2002-01-01  0:47 UTC (permalink / raw)
  To: 10675-done; +Cc: emacs-orgmode


OP here.  Closing it.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* 24.0.92; (image-size ...) on "large" images
@ 2012-01-31  5:51 Jambunathan K
  2002-01-01  0:47 ` bug#10675: " Jambunathan K
  0 siblings, 1 reply; 2+ messages in thread
From: Jambunathan K @ 2012-01-31  5:51 UTC (permalink / raw)
  To: bug-gnu-emacs, Orgmode


org-odt.el relies on (image-size ...) to determine pixel dimensions of
an image. For "large" images, this API returns "false" values. It would
be wonderful, if Emacs returns just the true value of the image or
nothing at all.

On a related note, IIRC, during batch export there is no way I can use
create-image + image-size to determine pixel dimensions of the image. Is
there a reliable and uniform way to determine size of images that are
*never* intended to be displayed.

Original issue:
http://www.mail-archive.com/emacs-orgmode@gnu.org/msg51014.html

My notes:
http://www.mail-archive.com/emacs-orgmode@gnu.org/msg51441.html

,---- http://www.mail-archive.com/emacs-orgmode@gnu.org/msg51441.html
| Re: [O] [ODT] image scaling overridden by long caption
| 
| Jambunathan K
| Mon, 30 Jan 2012 20:59:37 -0800
| 
| Andreas Leha <andreas.l...@med.uni-goettingen.de> 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
`----

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-01-31  5:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-31  5:51 24.0.92; (image-size ...) on "large" images Jambunathan K
2002-01-01  0:47 ` bug#10675: " Jambunathan K

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).