ALAsset Image Size

Ser Pounce picture Ser Pounce · Apr 9, 2012 · Viewed 9.1k times · Source

Given an ALAsset that represents a photo, is it possible to retrieve the size of the photo (height and width) without loading the image into a UIImageView and also without using the aspectRationThumnail method?

Answer

holtmann picture holtmann · Apr 10, 2012

Just a note: iOS 5.1 introduces a new property dimensions for an ALAssetRepresentation instance. This returns a CGSize structure with the dimensions of the original image and might be the best solution for this problem in the future.

Cheers,

Hendrik