{ "id": "120671", "key": "AC-2694", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2013-10-21T21:24:53.000+0000", "created": "2013-10-01T16:37:37.000+0000", "labels": [ "android", "camera", "imageview", "tableview" ], "versions": [], "issuelinks": [], "assignee": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "updated": "2016-03-08T07:41:48.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "When taking a photo with the camera and then rendering it in an imageview within a tableview, the imageview doesn't always render the photo in the correct orientation.\r\n\r\nTo reproduce the issue:\r\nStart in portrait, take a picture, and the thumbnail will show up correctly in portrait. Now switch to landscape, take another picture, and the thumbnail will incorrectly show in portrait.\r\n\r\n{code}\r\nvar win, table, row, cameraImage, image;\r\n \r\nfunction openCamera() {\r\n Ti.Media.showCamera({\r\n success: function(event) {\r\n if (event.mediaType === Ti.Media.MEDIA_TYPE_PHOTO) {\r\n if(image) {\r\n row.remove(image);\r\n }\r\n image = Ti.UI.createImageView({\r\n right: '10dp',\r\n width: '40dp',\r\n height: '40dp',\r\n image: event.media,\r\n autorotate: true\r\n });\r\n row.add(image);\r\n } else {\r\n alert('wrong type: ' + event.mediaType);\r\n }\r\n },\r\n cancel: function() {\r\n },\r\n error: function(error) {\r\n alert(error);\r\n },\r\n saveToPhotoGallery: true,\r\n allowEditing: true,\r\n mediaTypes: [ Ti.Media.MEDIA_TYPE_VIDEO, Ti.Media.MEDIA_TYPE_PHOTO ]\r\n });\r\n}\r\n \r\nwin = Ti.UI.createWindow({\r\n backgroundColor: '#fff'\r\n});\r\n \r\nrow = Ti.UI.createTableViewRow({\r\n height: '60dp',\r\n className: 'image-row'\r\n});\r\nvar cameraImage = Ti.UI.createImageView({\r\n right: '10dp',\r\n width: '40dp',\r\n height: '40dp',\r\n //image: '/images/camera.png',\r\n autorotate: true\r\n});\r\nrow.add(cameraImage);\r\n \r\ntable = Ti.UI.createTableView({\r\n top: 0, bottom: 0, left: 0, right: 0\r\n});\r\ntable.setData([ row ]);\r\ntable.addEventListener('click', openCamera);\r\nwin.add(table);\r\n \r\nwin.open();\r\n{code}\r\n\r\nTested on Galaxy SIII running Android 4.0.4, but I believe it can be tested on any Android 4.x device.", "attachment": [], "flagged": false, "summary": "Android: Camera image orientation doesn't work correctly when image is in tableview", "creator": { "name": "jtoth", "key": "jtoth", "displayName": "Justin Toth", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "jtoth", "key": "jtoth", "displayName": "Justin Toth", "active": true, "timeZone": "America/New_York" }, "environment": "Android 4.0.4\r\nTitanium 3.1.3.GA", "comment": { "comments": [ { "id": "276023", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "Hello,\r\nran the testcase, can't reproduce the issue. Please provide a better testcase or better instructions for reproduce the bug. \r\n\r\nBest,\r\n\r\nMauro ", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2013-10-21T21:24:53.000+0000", "updated": "2013-10-21T21:24:53.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }