[TIMOB-2293] iOS, 4.2 - Image being unexpectedly rotated and scaled on background image test case (4.2 only)
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T01:58:40.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.5.0 |
Components | iOS |
Labels | 4.2, camera, image, ios, nojit |
Reporter | Thomas Huelbert |
Assignee | Blain Hamon |
Created | 2011-04-15T03:15:51.000+0000 |
Updated | 2011-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
- 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.
- 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] });
- 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.
- 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...
- Thomas Huelbert 2011-04-15
closing against 1.5.0.fb4b340 ipod 4gt