From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Xah Lee Newsgroups: gmane.emacs.help Subject: does create-image caches?? Date: Thu, 22 Nov 2007 12:19:18 -0800 (PST) Organization: http://groups.google.com Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1195764052 31165 80.91.229.12 (22 Nov 2007 20:40:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 22 Nov 2007 20:40:52 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Nov 22 21:40:58 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IvIqx-0000ND-Gz for geh-help-gnu-emacs@m.gmane.org; Thu, 22 Nov 2007 21:40:51 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IvIqj-0002z1-5g for geh-help-gnu-emacs@m.gmane.org; Thu, 22 Nov 2007 15:40:37 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!d21g2000prf.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 27 Original-NNTP-Posting-Host: 69.236.97.82 Original-X-Trace: posting.google.com 1195762758 24429 127.0.0.1 (22 Nov 2007 20:19:18 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Thu, 22 Nov 2007 20:19:18 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: d21g2000prf.googlegroups.com; posting-host=69.236.97.82; posting-account=qPxGtQkAAADb6PWdLGiWVucht1ZDR6fn User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/419.3 (KHTML, like Gecko) Safari/419.3, gzip(gfe), gzip(gfe) Content-Disposition: inline Original-Xref: shelby.stanford.edu gnu.emacs.help:153980 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:49411 Archived-At: 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 $B-t(B http://xahlee.org/