Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25336] iOS 11: openPhotoGallery/allowEditing does not crop correctly.

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionNot Our Bug
Resolution Date2020-03-10T17:25:22.000+0000
Affected Version/sRelease 6.2.2, Release 6.2.0, Release 6.2.1
Fix Version/sn/a
ComponentsiOS
Labelsapplebug, engReviewed, ios11, openphotogallery
ReporterGrant Wolz
AssigneeVijay Singh
Created2017-09-22T19:05:44.000+0000
Updated2020-03-10T17:25:22.000+0000

Description

If you open the devices photos with allowEditing: true you are allowed to crop the photo in device. I have found that with the update to iOS 11 all of my crops do not match what the user as set in the crop window. Attached is a simple code to edit a photo and display it.

Attachments

FileDateSize
1.png2017-09-23T18:08:09.000+00001236501
2.png2017-09-23T18:08:24.000+00002187749
3.png2017-09-23T18:08:18.000+00001845384
app.js2017-09-22T19:01:00.000+0000949
B1.png2017-09-23T18:11:50.000+00002407618
B2.png2017-09-23T18:11:48.000+00001252082
captured_image.png2017-09-28T09:37:14.000+0000401444
crop_rect.png2017-09-28T09:37:14.000+0000885356
TestCameraImage.zip2017-09-28T09:37:02.000+000033756

Comments

  1. Hans Knöchel 2017-09-23

    hey there, I tried reproducing the issue was unable to. Tested on an iPhone X and the images looks correctly (although in the example you were forcing a square-image which would stretch the image in some cases, e.g. for images where the width is greater than the height). If you can attach your results, we may be able to help, thx! I've added three images to show the select->crop->display flow between iOS < 11 and iOS 11. *EDIT*: However, B1 and B2 demonstrate the incorrect behavior, which is interesting because it's not for all kind of crops. Moving to TIMOB for now, but may even be an iOS 11 issue. *EDIT 2*: Ok, here is the issue: Edited images usually come/came in a lower quality (640x640px), so we introduced a manual cropping in TIMOB-7511 which now looks like it's causing issues - probably around scaling. Why ever this changed between iOS < 11 and iOS 11. These are the differences between iOS 10.3.1 and iOS 11 (same device, same photo): *iOS 10.3.1*: original: size {4288, 2848} edited: size {1239, 1239} edited rect: NSRect: 0, 0}, {2686, 2686 *iOS 11*: original: size {4288, 2848} edited: size {1242, 1209} edited rect: NSRect: 0, 0}, {1879, 1834
  2. Grant Wolz 2017-09-23

    Yes B1 and B2 shows the exact problem that I have been having in my testing. Glad you guys are working on it!
  3. Vijay Singh 2017-09-28

    I have verified the behavior in native app (attached “TestCameraImage.zip”) for iOS11 and found that in native app also it is behaving same . I have attached two 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 problem with iOS 11. I think apple will correct in upcoming releases of iOS 11. Thanks!
  4. Hans Knöchel 2017-09-28

    Thanks for the analysis Vijay! I've filed a bug-report at Apple: https://openradar.appspot.com/radar?id=4946037680635904
  5. Vijay Singh 2019-04-04

    Checked on iOS 12.2 / Xcode 10.2 still issue is there. It looks apple has not fixed it yet.
  6. Vijay Singh 2020-03-10

    Verified it in iOS 13.x . It is working fine. Apple has fixed the issue.

JSON Source