0
我想从UIImagePickerController中选择一张照片,并检查照片是否为横向。如果选择的照片是横向的,我想旋转到纵向。 所以,这里是我的代码UIImageOrientationRight(左)将不起作用
- (void)imagePickerController:(UIImagePickerController *)picker
didFinishPickingImage:(UIImage *)image
editingInfo:(NSDictionary *)editingInfo {
if(image.imageOrientation == UIImageOrientationRight || image.imageOrientation == UIImageOrientationLeft){
UIImage *retatedImg = [image imageRotatedByDegrees:90];
}else {
UIImage *retatedImg = image;
}
}
我敢肯定[imageRotatedByDegrees:]方法是工作的罚款。只是卡住了为什么它不识别风景照片。帮我!
谢谢!现在我明白了 – user842589 2012-02-01 11:40:36