unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* does create-image caches??
@ 2007-11-22 20:19 Xah Lee
  2007-11-22 20:55 ` Juanma Barranquero
  2007-11-22 20:59 ` Jason Rumney
  0 siblings, 2 replies; 3+ messages in thread
From: Xah Lee @ 2007-11-22 20:19 UTC (permalink / raw)
  To: help-gnu-emacs

i have this function which returns the image file's width and height
as a list, of a given image file path.

(defun get-image-dimensions2 (img-file-relative-path)
  "Returns a image file's width and height as a list."
  (let (tmp dimen)
    (setq tmp
          (create-image (concat default-directory img-file-relative-
path)))
    (setq dimen (image-size tmp t))
    (list (car dimen) (cdr dimen))
  )
)

My problem with this is that, suppose i have a image x.png. Now, i run
this function to get its dimensions. Now, i crop x.png so its
dimension is changed. But when i run this function again, the
dimension doesn't change.

Seems emacs somehow has cached size of previous tmp img. How to fix
this?

Thanks.

  Xah
  xah@xahlee.org
\xAD\xF4 http://xahlee.org/

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

end of thread, other threads:[~2007-11-22 20:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-22 20:19 does create-image caches?? Xah Lee
2007-11-22 20:55 ` Juanma Barranquero
2007-11-22 20:59 ` Jason Rumney

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