[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Get the actual width/height of an image

From: Yuan Fu
Subject: Get the actual width/height of an image
Date: Mon, 14 Sep 2020 16:22:03 -0400

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?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]