[AC-5738] iOS openPhotoGallery method gives incorrect image when allowEditing is set to true
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Resolved |
Resolution | Duplicate |
Resolution Date | 2018-05-16T15:15:47.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | n/a |
Reporter | Prashant Saini |
Assignee | Shak Hossain |
Created | 2018-05-16T06:00:01.000+0000 |
Updated | 2018-05-16T15:15:48.000+0000 |
Description
I was trying to crop the image using iOS inbuilt cropping feature for gallery/camera pictures.
I had set the *allowEditing* to *true*, but the cropped image is incorrect and seems that cropping is being done from top-left corner instead of actual cropping area. Also tried by saving the cropped picture in device storage but it is incorrect there as well.
Here's the sample code I used and the screenshots for the same.
var win = Ti.UI.createWindow({
backgroundColor : 'white'
});
win.add(Ti.UI.createView({
top : 0,
height : 60,
backgroundColor : '#1b56d1'
}));
win.add(Ti.UI.createLabel({
top : 25,
text : "Photo Editing Bug",
font : {
fontSize : 20,
fontWeight : 'bold'
},
color : 'white'
}));
var image_view = Ti.UI.createImageView({
bottom : 70,
top : 70,
left : 10,
right : 10,
backgroundColor : '#ddd'
});
var button = Ti.UI.createButton({
title :' TAKE PICTURE ',
bottom : 20,
backgroundColor : 'blue',
color : 'white'
});
button.addEventListener('click', function () {
Ti.Media.openPhotoGallery({
allowEditing : true,
mediaTypes : [Ti.Media.MEDIA_TYPE_PHOTO],
success : function (e) {
image_view.image = e.media;
}
});
});
win.add(image_view);
win.add(button);
win.open();
Attachments
File | Date | Size |
---|---|---|
1.png | 2018-05-16T05:58:36.000+0000 | 32340 |
2.png | 2018-05-16T05:58:45.000+0000 | 862646 |
3.png | 2018-05-16T05:59:01.000+0000 | 711935 |
Hello, Thanks for reporting this. Do you experience this in all devices? Please let us know and share us your detail environment information.
I cannot test it on all devices due to unavailability. However I tested it only on iPhone 5s simulator on iOS 11.3 version. I am going to test it on a real iOS device tomorrow but even it should not behave improper on simulator as it never had earlier.
Hey there! This is a duplicate of TIMOB-25336, unfortunately a known Apple iOS bug.