From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Markus Triska Newsgroups: gmane.emacs.bugs Subject: bug#52931: 27.1; image-size sometimes yields a wrong image size in pixels Date: Sat, 01 Jan 2022 18:00:54 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31301"; mail-complaints-to="usenet@ciao.gmane.io" To: 52931@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jan 01 18:03:07 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 1n3hmd-0007yU-9c for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 01 Jan 2022 18:03:07 +0100 Original-Received: from localhost ([::1]:51908 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n3hmb-0003Sq-3D for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 01 Jan 2022 12:03:05 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:37022) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n3hlb-0001TR-3S for bug-gnu-emacs@gnu.org; Sat, 01 Jan 2022 12:02:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47678) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n3hla-0007th-N5 for bug-gnu-emacs@gnu.org; Sat, 01 Jan 2022 12:02:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n3hla-0005bT-Hi for bug-gnu-emacs@gnu.org; Sat, 01 Jan 2022 12:02:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Markus Triska Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 01 Jan 2022 17:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 52931 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.164105646421452 (code B ref -1); Sat, 01 Jan 2022 17:02:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 1 Jan 2022 17:01:04 +0000 Original-Received: from localhost ([127.0.0.1]:59224 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n3hke-0005Zw-3C for submit@debbugs.gnu.org; Sat, 01 Jan 2022 12:01:04 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:48866) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n3hkb-0005ZP-MQ for submit@debbugs.gnu.org; Sat, 01 Jan 2022 12:01:02 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:36850) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n3hkZ-0000Gf-Tk for bug-gnu-emacs@gnu.org; Sat, 01 Jan 2022 12:01:00 -0500 Original-Received: from [78.47.144.35] (port=37956 helo=metalevel.at) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n3hkW-0007i0-EN for bug-gnu-emacs@gnu.org; Sat, 01 Jan 2022 12:00:59 -0500 Original-Received: from mt-mbpro.localdomain (localhost [127.0.0.1]) by metalevel.at (Postfix) with ESMTP id F13BC9C73F for ; Sat, 1 Jan 2022 18:00:54 +0100 (CET) Original-Received: by mt-mbpro.localdomain (Postfix, from userid 501) id C1D5414C6769; Sat, 1 Jan 2022 18:00:54 +0100 (CET) X-Host-Lookup-Failed: Reverse DNS lookup failed for 78.47.144.35 (failed) Received-SPF: none client-ip=78.47.144.35; envelope-from=triska@metalevel.at; helo=metalevel.at X-Spam_score_int: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 5.0 requ) RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=no autolearn_force=no X-Spam_action: no action 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:223506 Archived-At: Dear all, to reproduce this issue, please download the following image: https://www.metalevel.at/ei/202202.png Then start Emacs with $ emacs -Q and evaluate the following form to obtain the image's size in pixels: (let ((img (create-image "202202.png"))) (image-size img t)) In my case, this yields: (30 . 30) This occurs even though the image dimensions in pixels are actually 202x202: $ identify 202202.png 202202.png PNG 202x202 202x202+0+0 8-bit sRGB 6502B 0.000u 0:00.009 Is there a way to obtain this size in pixels with image-size? The value of max-image-size in my configuration is nil. Thank you and all the best! Markus In GNU Emacs 27.1 (build 1, x86_64-apple-darwin15.3.0, X toolkit, Xaw scroll bars) of 2020-12-12 built on macbook Windowing system distributor 'The X.Org Foundation', version 11.0.11502000 System Description: Mac OS X 10.11.3 Configured using: 'configure --prefix=/opt/local --disable-silent-rules --without-ns --without-dbus --without-gconf --without-libotf --without-m17n-flt --with-gmp --with-gnutls --with-json --with-xml2 --with-modules --infodir /opt/local/share/info/emacs --with-x-toolkit=lucid --without-xaw3d --without-imagemagick --with-xpm --with-jpeg --with-tiff --with-gif --with-png --with-lcms2 --without-rsvg --with-xft 'CFLAGS=-pipe -Os -arch x86_64' CPPFLAGS=-I/opt/local/include 'LDFLAGS=-L/opt/local/lib -Wl,-headerpad_max_install_names -lfreetype -lfontconfig -Wl,-no_pie -arch x86_64'' Configured features: XPM JPEG TIFF GIF PNG GSETTINGS GLIB NOTIFY KQUEUE ACL GNUTLS LIBXML2 FREETYPE HARFBUZZ XFT ZLIB TOOLKIT_SCROLL_BARS LUCID X11 XDBE XIM MODULES THREADS JSON PDUMPER LCMS2 GMP