iphone - how can i get the height and width of uiimage

Satyam picture Satyam · Mar 9, 2011 · Viewed 165.8k times · Source

From the URL Image in Mail

I'm adding image to mail view. It will show full image. But I want to calculate, proportionally change the height and width of the image.

How can I get the height and width of UIImage?

Answer

Jgubman picture Jgubman · Mar 9, 2011
let heightInPoints = image.size.height
let heightInPixels = heightInPoints * image.scale

let widthInPoints = image.size.width
let widthInPixels = widthInPoints * image.scale