My question is that I want to add crop image functionality in my pocketWallet app. I want to take image from camera and save it in ImageView after that i want to crop that image. I have read many questions like same but it Unfotunatly not found required answer.
Please tell me how can I change imageview size with exact image size that i take from camera.
I am using a uiview to crop the specific part of the image . But when I cropped the image then not get exact part which I want to crop. My cropped image code is below,
-(UIImage *)cropImage{
float tempx=CGRectGetMinX(cropedAngle.frame);
float tempy=CGRectGetMinY(cropedAngle.frame);
CGRect rect=CGRectMake(tempx, tempy, 320, 200);
CGImageRef image = [imgView.image CGImage];
CGImageRef imageRef = CGImageCreateWithImageInRect(image,rect);
UIImage *imge = [UIImage imageWithCGImage:imageRef];
CGImageRelease(imageRef);
// Create and show the new image from bitmap
return imge;
}
First of tell my logic is right or not to crop image? In which this code cropedAngle is my uiview which i used to crop the specific part of image .
Where am I wrong?