all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#52931: 27.1; image-size sometimes yields a wrong image size in pixels
@ 2022-01-01 17:00 Markus Triska
  2022-01-01 17:09 ` Eli Zaretskii
  2022-09-27 17:28 ` Lars Ingebrigtsen
  0 siblings, 2 replies; 14+ messages in thread
From: Markus Triska @ 2022-01-01 17:00 UTC (permalink / raw)
  To: 52931

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





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

end of thread, other threads:[~2022-09-29 13:28 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-01 17:00 bug#52931: 27.1; image-size sometimes yields a wrong image size in pixels Markus Triska
2022-01-01 17:09 ` Eli Zaretskii
2022-09-27 17:28 ` Lars Ingebrigtsen
2022-09-28 17:24   ` Markus Triska
2022-09-28 17:28     ` Lars Ingebrigtsen
2022-09-28 18:09       ` Markus Triska
2022-09-28 18:43         ` Eli Zaretskii
2022-09-28 18:57           ` Markus Triska
2022-09-28 19:12             ` Eli Zaretskii
2022-09-28 20:09               ` Markus Triska
2022-09-29  5:44                 ` Eli Zaretskii
2022-09-29 13:15                   ` Stefan Kangas
2022-09-29 13:28                     ` Eli Zaretskii
2022-09-28 19:10       ` Eli Zaretskii

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.