[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
does create-image caches??
From: |
Xah Lee |
Subject: |
does create-image caches?? |
Date: |
Thu, 22 Nov 2007 12:19:18 -0800 (PST) |
User-agent: |
G2/1.0 |
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/
- does create-image caches??,
Xah Lee <=