在我的應用我爲使用如下代碼裁剪所拍攝的圖像: -如何在iPhone中裁剪圖像?
-(void)imagePickerController:(UIImagePickerController *) picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
#ifdef _DEBUG
NSLog(@"frmSkinImage-imagePickerController-Start");
#endif
imageView.image = [info objectForKey:@"UIImagePickerControllerOriginalImage"];
//=======================================
UIImage *image =imageView.image;
CGRect cropRect = CGRectMake(100, 100, 125,128);
CGImageRef imageRef = CGImageCreateWithImageInRect([image CGImage], cropRect);
[imageView setImage:[UIImage imageWithCGImage:imageRef]];
CGImageRelease(imageRef);
//===================================================
//imgglobal = [info objectForKey:@"UIImagePickerControllerOriginalImage"];
// for saving image to photo album
//UIImageWriteToSavedPhotosAlbum(imageView.image, self, @selector(image:didFinishSavingWithError:contextInfo:), self);
[picker dismissModalViewControllerAnimated:YES];
#ifdef _DEBUG
NSLog(@"frmSkinImage-imagePickerController-End");
#endif
}
但我的問題是,當我用相機拍下照片裁剪拍攝的圖像,圖像旋轉,向右90度並在我使用照片庫的情況下,它完美的作品。
所以你可以過濾我的上述代碼,知道我錯在哪裏。
請幫我出其迫切 由於事先