ALAssetRepresentation fullResolutionImage's UIImageOrientation is wrong
I'm trying to ALAssetLibrary to fetch pictures in Photos app, but recently I found a problem, when I get the CGImageRef from ALAssetRepresentation, the UIImageOrientation is wrong(rotated 90 degree), but when I get width and height from the CGImageRef, they're wrong either, now how could I get the right CGImageRef or use开发者_Python百科 the CGImageRef to create a right UIImage?
Use the imageWithCGImage:scale:orientation: method of UIImage. And pass in the the ALAssetPropertyOrientation property of ALAsset for the orientation parameter.
精彩评论