Titanium JIRA Archive
Appcelerator Community (AC)

[AC-2431] Pictures taken on Galaxy S3 do not respect Orientation

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionFixed
Resolution Date2012-11-09T01:05:40.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsn/a
ReporterJerod Fritz
AssigneeShak Hossain
Created2012-11-07T15:13:07.000+0000
Updated2016-03-08T07:41:28.000+0000

Description

- Take a photo that was in portrait orientation. Save or place photo into an image view and orientation is not respected - Open a photo that was taken with Camera in portrait orientation. Image is shown in landscape mode.

Comments

  1. Anirudh Nagesh 2012-11-07

  2. Jerod Fritz 2012-11-07

    Was just able to replicate with 3.0.0.v20121106114610 on Galaxy S3
  3. Anirudh Nagesh 2012-11-07

    Hi Jerod, I just re-tested it with S3 and the sample test case provided in the jira ticket with 3.0.0.v20121106114610 build. The image orientation is proper after taking a pic from camera. Please let me know if you are using a different test case or doing differently. If not, could you please test it on another device? Regards, Anirudh
  4. Jerod Fritz 2012-11-07

    I see the autorotate:true does allow the exif data to be read for the imageview, but in our use case we're need to do some image manipulation and then save the file to storage without attaching the image to the display. 1. Take a photo 2. Create thumbnail of photo and save 3. Attach overlay to photo cropped to certain dimensions and save that photo
  5. Anirudh Nagesh 2012-11-07

    If you can provide me a simple test case of what you are doing, I shall test it and re-open the Jira if necessary. Regards, Anirudh
  6. Jerod Fritz 2012-11-07

    Is there a way to read EXIF data to determine orientation of photo in the success callback function of the event.media ?
  7. Anirudh Nagesh 2012-11-07

  8. Jerod Fritz 2012-11-08

    The toImage() call on android was causing consistent crashing but this seems to have done the trick:
             var imageFile = event.media;     
             var imageAsTaken = Ti.UI.createImageView({
               image : imageFile,
               autorotate : true
             });
             if (!ui.isAndroid()) {
               imageFile = imageAsTaken.toImage();
             } else {
               imageFile = imageAsTaken.toBlob();
             }
       
  9. Anirudh Nagesh 2012-11-09

    Cool. Good to know about it. Please follow it up on the other ticket ( exif data ). Can i close the ticket if you dont have any further questions? Regards, Anirudh
  10. Jerod Fritz 2012-11-09

    Yes, you can close. Thank you
  11. Anirudh Nagesh 2012-11-09

    Thanks :)

JSON Source