unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Get the actual width/height of an image
@ 2020-09-14 20:22 Yuan Fu
  2020-09-14 20:52 ` Emanuel Berg via Users list for the GNU Emacs text editor
  0 siblings, 1 reply; 7+ messages in thread
From: Yuan Fu @ 2020-09-14 20:22 UTC (permalink / raw)
  To: help-gnu-emacs

Here’s what I want to do: I want to show an image in slices, and I want to be able to resize the image to certain width/height. For example, I want to set the width of an image to, say, 300 pixels. IIUC, to show the image in slices I need to now how many rows to use (row-count = image-height / line-height). However, there is no way for me to know what the height should be to make the width to be 300 pixels. There doesn’t seem to be a function to get the aspect ratio of the image, or the actual pixel height/width of the image. So can I get this information?

Thanks,
Yuan


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

end of thread, other threads:[~2020-09-15 13:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-14 20:22 Get the actual width/height of an image Yuan Fu
2020-09-14 20:52 ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-09-14 21:18   ` Corwin Brust
2020-09-14 21:40     ` Yuan Fu
2020-09-14 22:20     ` Stefan Monnier
2020-09-15  0:13       ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-09-15 13:43         ` Stefan Monnier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).