From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#52931: 27.1; image-size sometimes yields a wrong image size in pixels Date: Thu, 29 Sep 2022 08:44:06 +0300 Message-ID: <83tu4qhh09.fsf@gnu.org> References: <87mtak20cg.fsf@gnus.org> <877d1ntns2.fsf@metalevel.at> <877d1nxvbw.fsf@gnus.org> <87k05n2wxa.fsf@metalevel.at> <83zgejgx0m.fsf@gnu.org> <87o7uzfhti.fsf@metalevel.at> <83v8p7gvny.fsf@gnu.org> <87bkqzclcb.fsf@metalevel.at> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24317"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, 52931@debbugs.gnu.org To: Markus Triska Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 29 07:45:59 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1odmMw-0006BN-UF for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 29 Sep 2022 07:45:59 +0200 Original-Received: from localhost ([::1]:59954 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1odmMv-0003tY-Ig for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 29 Sep 2022 01:45:57 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54572) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1odmM2-0003tN-BV for bug-gnu-emacs@gnu.org; Thu, 29 Sep 2022 01:45:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36572) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1odmM2-00075M-3B for bug-gnu-emacs@gnu.org; Thu, 29 Sep 2022 01:45:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1odmM1-00042v-Ov for bug-gnu-emacs@gnu.org; Thu, 29 Sep 2022 01:45:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 29 Sep 2022 05:45:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52931 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug Original-Received: via spool by 52931-submit@debbugs.gnu.org id=B52931.166443025915490 (code B ref 52931); Thu, 29 Sep 2022 05:45:01 +0000 Original-Received: (at 52931) by debbugs.gnu.org; 29 Sep 2022 05:44:19 +0000 Original-Received: from localhost ([127.0.0.1]:35650 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1odmLK-00041l-T6 for submit@debbugs.gnu.org; Thu, 29 Sep 2022 01:44:19 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:38414) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1odmLI-00041V-V6 for 52931@debbugs.gnu.org; Thu, 29 Sep 2022 01:44:17 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:41688) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1odmLD-00071Q-0D; Thu, 29 Sep 2022 01:44:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=TblLf9TOvaJp1muOl7UgVb8Knlsp6wq1jZRNfoEPFyQ=; b=pZ+iidWxOiPt hkb2aJBOjFZvdsvuI/Vs0/Iyds9TA27+PYakfh5hbrvialJDIttg1Bm+8lL1LMNfZ4rXD7TDnleZU 7DLrj9gp+LM/VKs57fEWTXpa7Ey4vmBjymwiNbfytXbkkbzGMytgN8/I6WKGnBfZABy1pVUp7dzMt JHstB5/ZVXGyFnLHm6E+s/UoIPRXkNJ5wCZF5YYwwbKK9eUAmVzmz2nBJ+DPydiXbKGQWETF6vg7f /YALK2hP4ND/SMssuA2hKuaZfSljLwXm6Z8zU1Jq88U7EaShxU4ReRXS+7Vs5MR02R+MBluWNicNz yYtBlrdv+ETdpp+aiFgxwg==; Original-Received: from [87.69.77.57] (port=3938 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1odmLC-0001gd-EE; Thu, 29 Sep 2022 01:44:10 -0400 In-Reply-To: <87bkqzclcb.fsf@metalevel.at> (message from Markus Triska on Wed, 28 Sep 2022 22:09:24 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:243868 Archived-At: > From: Markus Triska > Cc: larsi@gnus.org, 52931@debbugs.gnu.org > Date: Wed, 28 Sep 2022 22:09:24 +0200 > > Eli Zaretskii 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.