Opening photo from gallery with editing enabled crops result incorrectly

Number:rdar://34714906 Date Originated:2017/09/28
Status:Open Resolved:
Product:iOS Product Version:11.0
Classification:Bug Reproducible:Always

We received a bug-report that opening an image from the gallery with editing (square-cropping) enabled would return a wrong edited image and cropped rectangle. 

I have attached 3 files (2 screenshots): 
1. crop_rect.png - Screenshot taken when image is selected and open in crop mode.
2. captured_image.png - Screenshot taken when “choose” button selected and cropped image set to image view.

If you see ‘captured_image.png’, you will see that actually captured image has came from area bounded between two horizontal red lines in ‘crop_rect.png’. Ideally it should capture image from default crop rectangle area which can be seen in ‘crop_rect.png’.

It looks cropping rectangle is getting translated in vertical upward direction, which is a problem with iOS 11 only.

Steps to Reproduce:
Run the sample app and compare the resulting screens.

Expected Results:
The image is cropped as selected in the editing-screen after selecting the photo.

Actual Results:
The image is cropped incorrectly and does include areas that have not been selected.

Default - Xcode 9, iOS 11.0



Duplicated here for iOS 12 SDK:

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at 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!