Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-2293] iOS, 4.2 - Image being unexpectedly rotated and scaled on background image test case (4.2 only)

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:58:40.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.5.0
ComponentsiOS
Labels4.2, camera, image, ios, nojit
ReporterThomas Huelbert
AssigneeBlain Hamon
Created2011-04-15T03:15:51.000+0000
Updated2011-04-17T01:58:40.000+0000

Description

you'll need xcode 3.5.4,iOSsdk4.2 and itunes 10.1, the no jit TiJsCore

1.take a couple shots with the camera in portrait orientation
2.Phone>Save to gallery>Background image
3.select an image
4.note its appearance on the screen

results, the image was rotated 90° and was scaled/stretched. not seen with same app on 4.1

Comments

  1. Blain Hamon 2011-04-15

    This one's odd. I can recreate it with the images on the camera roll. But the new images I'm taking do not suffer this. We'll need to look this one over.

  2. dcpedit 2011-04-15

    Here's some code that I used to reproduce the issue:

       
         Ti.Media.showCamera({
           success:function(event) {
             var image = event.media;
             if(event.mediaType == Ti.Media.MEDIA_TYPE_PHOTO) {
               var f = Ti.Filesystem.getFile(Ti.Filesystem.tempDirectory, 'tmpimg.png');
               f.write(image);
               var view = Ti.UI.createView({
                 backgroundImage: Ti.Filesystem.tempDirectory + 'tmpimg.png'
               });
               Ti.UI.currentWindow.add(view);
             }
           },
           saveToPhotoGallery: true,
           mediaTypes: [Ti.Media.MEDIA_TYPE_PHOTO]
         });
       
  3. Blain Hamon 2011-04-15

    Note to self: This is because of the exif image orientation. On the images that work fine, the orientation is 1. On the images that are distorted, the orientation was 6.

    http://sylvana.net/jpegcrop/exif_orientation.html">http://sylvana.net/jpegcrop/exif_orientation.html

    Look into if we rotate BackgroundImage to compensate, and if we don't, we should.

  4. Blain Hamon 2011-04-15

    Darn bot not working.

    [#2293 state:fixed-in-qa] When a bg image's imageOrientation is not 'up', the image is rotated properly

    https://github.com/appcelerator/titanium_mobile/commit/66a7f20ae10a5f977e7c8b2d7ca5e732c37e0779"> https://github.com/appcelerator/titanium_mobile/commit/66a7f20ae10a...

  5. Thomas Huelbert 2011-04-15

    closing against 1.5.0.fb4b340 ipod 4gt

JSON Source