GNU bug report logs - #52931
27.1; image-size sometimes yields a wrong image size in pixels

Previous Next

Package: emacs;

Reported by: Markus Triska <triska <at> metalevel.at>

Date: Sat, 1 Jan 2022 17:02:02 UTC

Severity: normal

Tags: notabug

Found in version 27.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #42 received at 52931 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Markus Triska <triska <at> metalevel.at>
Cc: larsi <at> gnus.org, 52931 <at> debbugs.gnu.org
Subject: Re: bug#52931: 27.1;
 image-size sometimes yields a wrong image size in pixels
Date: Thu, 29 Sep 2022 08:44:06 +0300
> From: Markus Triska <triska <at> metalevel.at>
> Cc: larsi <at> gnus.org,  52931 <at> debbugs.gnu.org
> Date: Wed, 28 Sep 2022 22:09:24 +0200
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> > What do you think Emacs does when you use relative image file names in
> > create-image?
> 
> I would hope it does the same thing it does for every other function I
> know where relative file names are used: Use the file from the current
> working directory, i.e., default-directory.

No, it doesn't do that.  It looks up relative file names along
image-load-path.  The reason is that image files are many times
displayed on the tool bar and the fringes, which are not specific to a
buffer, and thus we cannot possibly ensure default-directory is always
set to the right place when we display those.

> However, as far as I can tell, create-image is currently
> unexpectedly not doing this reliably, or at least not on OSX, even
> though it seems to do it on your system.

I used an absolute file name in my tests, because, obviously, the file
you posted doesn't live here in the same directory as on your system.

So I think we now understand the reason for the problem, and there's
nothing else we should do here.




This bug report was last modified 2 years and 294 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.