Nothing happens.
dpestana opened this issue · comments
Hi there,
Thank you for sharing this code. I'm having problems using it, maybe I'm doing something wrong, but when I click on the images to be picked nothing happens. Here is my code:
-
(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
UIImage* outputImage = [info objectForKey:UIImagePickerControllerEditedImage];
if (outputImage == nil) {
outputImage = [info objectForKey:UIImagePickerControllerOriginalImage];
}if (outputImage) {
if (outputImage.size.width >= 2449) {UzysImageCropperViewController *imgCropperViewController = [[UzysImageCropperViewController alloc] initWithImage:outputImage andframeSize:[UIScreen mainScreen].bounds.size andcropSize:CGSizeMake(1024, 1024)]; imgCropperViewController.delegate = self; imgCropperViewController.modalPresentationStyle = UIModalPresentationFullScreen; } if (outputImage.size.height >= 2449) { UzysImageCropperViewController *imgCropperViewController = [[UzysImageCropperViewController alloc] initWithImage:outputImage andframeSize:[UIScreen mainScreen].bounds.size andcropSize:CGSizeMake(1024, 1024)]; imgCropperViewController.delegate = self; imgCropperViewController.modalPresentationStyle = UIModalPresentationFullScreen; } else {
//goes on with other code
What this means is I just want to crop images that are higher than 2448*2448.
Thanks for your help in advance.
put this code ' [picker presentViewController:_imgCropperViewController animated:YES completion:nil];'
Thanks a lot Uzysjung. Works fantastic now. The best of all: it keeps high resolution. Thank you.
Black screen showing
--When I select image then only shows black screen
Please help
Thanks
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
UIImage *image = [info objectForKey:UIImagePickerControllerOriginalImage];
NSLog(@"original Image Size : %@", NSStringFromCGSize(image.size));
_imgCropperViewController = [[UzysImageCropperViewController alloc] initWithImage:image andframeSize:picker.view.frame.size andcropSize:CGSizeMake(400, 580)];
_imgCropperViewController.delegate = self;
[picker presentViewController:_imgCropperViewController animated:YES completion:nil];
[_imgCropperViewController release];
}