all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / 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

* Re: does create-image caches??
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Juanma Barranquero @ 2007-11-22 20:55 UTC (permalink / raw)
  To: Xah Lee; +Cc: help-gnu-emacs

On Nov 22, 2007 9:19 PM, Xah Lee <xah@xahlee.org> wrote:

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

Try `clear-image-cache'.

             Juanma

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

* Re: does create-image caches??
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Jason Rumney @ 2007-11-22 20:59 UTC (permalink / raw)
  To: help-gnu-emacs

On 22 Nov, 20:19, Xah Lee <x...@xahlee.org> wrote:

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

M-x apropos  image-cache

^ 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

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.