UIImagePickerController gives wrong results when editing is enabled

Originator:friedrich.markgraf
Number:rdar://13402275 Date Originated:12-Mar-2013 07:17 PM
Status:Open Resolved:
Product:iPad SDK Product Version:iOS 6
Classification:Serious Bug Reproducible:Always
 
Summary:
When letting the user pick an image from the Photo Library using UIImagePickerController, and the picker has allowsEditing = YES, the edited image as well as the crop rectangle are wrong for most larger non-square images (Testing note: With screenshots, it seems to work as intended, so try other images as well).

Additionally, there is no way to tell whether the image has actually been edited or not, because even for an image the user didn't touch, the crop rectangle is not equal to the dimensions of the selected image, and there is also no other key by which to determine whether the user did actually intend to crop.

Also, the crop area is always square, without any way to set it otherwise. This last issue is not a bug, but it makes the feature all but unusable for any purpose that does not require a square crop (and also the current implementation does not even guarantee a square cropping area).

Steps to Reproduce:

1. Create UIImagePickerViewController
2. imgPicker.allowsEditing = YES;
3. Present controller
4. in the delegate method, when the user has picked an image, log the info dictionary.
5. Observe wrongness of values.

Expected Results:

There should be a way to tell when the user did not touch the image, indicating no desire to crop.

Also, cropping should not occur in that case.

And, if at all possible, the crop area's aspect ratio should be changeable (ideally both programmatically as well as through the UI).

Actual Results:

Images are cropped, even though they shouldn't be. They also get black borders.

Regression:

Seems to always occur to me with many images, does not occur with some others.

Notes:

Duplicates

Number Status Originator Product Title
rdar://18957593 Duplicate/13402275 oliver.drobnik iOS UIImagePicker returns offset cropped image

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!