......
_ipc.didFinishBlock = ^(NSArray *info) {
[blockSelf.selectedPhotos setArray:info];
for (ALAsset * asset in info) {
CGImageRef ref = [[asset defaultRepresentation]fullResolutionImage];
UIImage *orgImage = [UIImage imageWithCGImage:[asset.defaultRepresentation fullScreenImage]
scale:[asset.defaultRepresentation scale] orientation:
(UIImageOrientation)[asset.defaultRepresentation orientation]];
// 这句解决了问题
orgImage = [UIImage imageWithCGImage:ref scale:1 orientation:orgImage.imageOrientation];
UIImage * image = [RHImageUtils scaleImage:orgImage toScale:0.3 maxThumSize:800];
[self sendImageMessage:image];
}
NSLog(@"Info: %@", info);
[blockSelf dismissModalViewControllerAnimated:YES];
......
后来发现是写法问题
ALAssetRepresentation *assetRep = [asset defaultRepresentation];
CGImageRef imgRef = [assetRep fullResolutionImage];
UIImage *orgImage = [UIImage imageWithCGImage:imgRef
scale:assetRep.scale
orientation:(UIImageOrientation)assetRep.orientation];
这样取图片就没有旋转90的问题