Question

I get asset using ALAssetLibrary. Is there way to know is this image landscape or portrait not loading the image but having only asset?

[asset thumbnail] returns (75,75) size image,so its doesn't help.

To load fullScreen or fullResolution image and compare its width and height is to heavy.

To load metadata and than pixelHeight and Width is also heavy.

So can someone help?

Was it helpful?

Solution

You can use the orientation method of ALAssetRepresentation (available since iOS 4.0). So your call would be something like this.

ALAssetOrientation orientation = [[asset defaultRepresentation] orientation];

The performance of this call should be fine.

Cheers,

Hendrik

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top