Sizing images in iPhone SDK

Just, is it possible to somehow fix the dimensions (specifically width and height) of an image using the iPhone SDK or iPhone SDK-compatible library / frame? Possibly pull sizes from EXIF โ€‹โ€‹metadata?

0


a source to share


2 answers


From the Apple API for UIImage

, create UIImage

an image from your data or file, then use size

to get a structure CGSize

representing the dimensions of the image.



+3


a source


If your UIImage

name image

is you can get its size and then use size to get the width and height, for example:



CGSize mySize = [image size];
CGFloat imageWidth = mySize.width;
CGFloat imageHeight = mySize.height;

      

0


a source







All Articles