{ "id": "122705", "key": "TIMOB-16122", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "16092", "description": "2014 Sprint 08", "name": "2014 Sprint 08", "archived": true, "released": true, "releaseDate": "2014-04-24" }, { "id": "16093", "description": "2014 Sprint 08 SDK", "name": "2014 Sprint 08 SDK", "archived": true, "released": true, "releaseDate": "2014-04-24" }, { "id": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-04-15T21:29:52.000+0000", "created": "2013-11-20T17:34:37.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "andoid", "imageview", "module_media", "overlay", "qe-closed-3.3.0", "qe-testadded", "showcamera", "supportTeam" ], "versions": [], "issuelinks": [ { "id": "34429", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "65021", "key": "TIMOB-3887", "fields": { "summary": "Android: Image taken in portrait orients itself to landscape ", "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" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2014-07-29T17:02:52.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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "When using Ti.Media.showCamera with an overlay on Android the returned media does not rotate correctly within an ImageView when autorotate is true.\r\n\r\nRemoving the overlay from the same code fixes the problem.", "attachment": [ { "id": "45192", "filename": "CameraOverlay-ConsoleOutput.txt", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-01-16T19:11:37.000+0000", "size": 5312, "mimeType": "text/plain" }, { "id": "45189", "filename": "Screenshot_2014-01-16-10-45-42.png", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-01-16T19:11:37.000+0000", "size": 61257, "mimeType": "image/png" }, { "id": "45190", "filename": "Screenshot_2014-01-16-10-48-15.png", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-01-16T19:11:37.000+0000", "size": 2081660, "mimeType": "image/png" }, { "id": "45191", "filename": "Screenshot_2014-01-16-10-51-15.png", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-01-16T19:11:37.000+0000", "size": 52042, "mimeType": "image/png" }, { "id": "45193", "filename": "tia-779242744.jpg", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-01-16T19:20:14.000+0000", "size": 3086321, "mimeType": "image/jpeg" } ], "flagged": false, "summary": "Android: Image does not rotate correctly within an ImageView with overlay", "creator": { "name": "nicholas", "key": "nicholas", "displayName": "Nicholas Cooper", "active": true, "timeZone": "Europe/London" }, "subtasks": [], "reporter": { "name": "nicholas", "key": "nicholas", "displayName": "Nicholas Cooper", "active": true, "timeZone": "Europe/London" }, "environment": "Galaxy S2\r\nHTC Desire C\r\nSDK 3.1.3 GA", "comment": { "comments": [ { "id": "281169", "author": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Hello,\r\n\r\nWe have tested this issue with the test code below. It’s working fine for us. Please try out this code to see if you can reproduce it. If you continue to encounter this issue, please send us your test sample.\r\n\r\n\r\nh5. Testing environment: \r\n\r\nOS: MAC OS X 10.8.5\r\nTi SDK: 3.1.3 GA \r\nTi CLI: 3.2.0 \r\nAndroid SDK 2.3.3 Device \r\n\r\n\r\nh5. Test code \r\n \r\n\r\n{code}\r\n\r\nvar win1 = Titanium.UI.createWindow({\r\n\tbackgroundColor : '#fff',\r\n});\r\n\r\nvar contenner = Ti.UI.createView({\r\n\twidth : Ti.UI.SIZE,\r\n\theight : Ti.UI.SIZE,\r\n\ttop : 0,\r\n\tbackgroundColor : '#eee',\r\n\tborderColor : '#eee',\r\n\tlayout : 'vertical',\r\n});\r\nwin1.add(contenner);\r\n\r\nvar anImageView = Ti.UI.createImageView({\r\n\r\n});\r\ncontenner.add(anImageView);\r\n\r\nvar controlview = Ti.UI.createView({\r\n\twidth : Ti.UI.FILL,\r\n\theight : Ti.UI.SIZE,\r\n\ttop : 20,\r\n});\r\n\r\ncontenner.add(controlview);\r\n\r\nvar frmcamera = Ti.UI.createButton({\r\n\tbackgroundImage : 'none',\r\n\tbackgroundColor : '#ff0000',\r\n\ttitle : 'Open Camera',\r\n\tcolor : '#fff',\r\n\twidth : 80,\r\n\theight : 50,\r\n\tleft : 10,\r\n});\r\n\r\nfrmcamera.addEventListener('click', function() {\r\n\tfireUpTheCamera();\r\n});\r\n\r\ncontrolview.add(frmcamera);\r\n\r\n \r\n// Create an ImageView.\r\nvar overlay = Ti.UI.createImageView({\r\n\timage : '/images/appcelerator_small.png',\r\n\twidth : Ti.UI.FILL,\r\n\theight : Ti.UI.FILL,\r\n\tautorotate: true,\r\n});\r\n\r\noverlay.addEventListener('load', function() {\r\n\tTi.API.info('Image loaded!');\r\n});\r\n\r\nfunction fireUpTheCamera() {\r\n\tTitanium.Media.showCamera({\r\n\r\n\t\tsuccess : function(event) {\r\n\t\t\tvar cropRect = event.cropRect;\r\n\t\t\tvar image = event.media;\r\n\r\n\t\t\tTi.API.debug('Our type was: ' + event.mediaType);\r\n\t\t\tif (event.mediaType == Ti.Media.MEDIA_TYPE_PHOTO) {\r\n\t\t\t\tanImageView.image = image;\r\n\t\t\t\t//new_upload_profile_picture_update(anImageView.image);\r\n\t\t\t} else {\r\n\t\t\t\talert(\"got the wrong type back =\" + event.mediaType);\r\n\t\t\t}\r\n\t\t},\r\n\t\tcancel : function() {\r\n\t\t},\r\n\t\terror : function(error) {\r\n\t\t\t// create alert\r\n\t\t\tvar a = Titanium.UI.createAlertDialog({\r\n\t\t\t\ttitle : 'Camera'\r\n\t\t\t});\r\n\r\n\t\t\t// set message\r\n\t\t\tif (error.code == Titanium.Media.NO_CAMERA) {\r\n\t\t\t\ta.setMessage('Please run this test on device');\r\n\t\t\t} else {\r\n\t\t\t\ta.setMessage('Unexpected error: ' + error.code);\r\n\t\t\t}\r\n\r\n\t\t\t// show alert\r\n\t\t\ta.show();\r\n\t\t},\r\n\t\tsaveToPhotoGallery : true,\r\n\t\tallowEditing : false,\r\n\t\toverlay : overlay,\r\n\t\tmediaTypes : [Ti.Media.MEDIA_TYPE_PHOTO]\r\n\t});\r\n}\r\n\r\nwin1.open();\r\n\r\n {code}\r\n\r\nh5. Step to test\r\n1.\tCreate a new project\r\n2.\tPaste test code in app.js\r\n3.\tNow run on Android Device \r\n4.\tClick on button to camera \r\n\r\n h5. Expect Result/Actual Result\r\nOverlay image rotate good \r\n\r\n\r\n\r\nThanks\r\n", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2013-11-25T17:41:14.000+0000", "updated": "2013-11-26T06:36:16.000+0000" }, { "id": "281352", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "Hello Nicholas,\ncan you please test the testcase and see if works for you? \n\nTIA!\n\nBest,\nMauro", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2013-11-26T06:36:58.000+0000", "updated": "2013-11-26T06:36:58.000+0000" }, { "id": "281353", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "Tested and can't reproduce. ", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2013-11-26T06:37:21.000+0000", "updated": "2013-11-26T06:37:21.000+0000" }, { "id": "281373", "author": { "name": "nicholas", "key": "nicholas", "displayName": "Nicholas Cooper", "active": true, "timeZone": "Europe/London" }, "body": "I've updated the test case, after you call TakePicture the image is rotated incorrectly, autoRotate does not work. \r\n\r\n{code} \r\nvar win1 = Titanium.UI.createWindow({\r\n\tbackgroundColor : '#fff',\r\n});\r\n\r\nvar contenner = Ti.UI.createView({\r\n\twidth : Ti.UI.SIZE,\r\n\theight : Ti.UI.SIZE,\r\n\ttop : 0,\r\n\tbackgroundColor : '#eee',\r\n\tborderColor : '#eee',\r\n\tlayout : 'vertical',\r\n});\r\nwin1.add(contenner);\r\n\r\nvar anImageView = Ti.UI.createImageView({\r\n\tautorotate: true,\r\n});\r\ncontenner.add(anImageView);\r\n\r\nvar controlview = Ti.UI.createView({\r\n\twidth : Ti.UI.FILL,\r\n\theight : Ti.UI.SIZE,\r\n\ttop : 20,\r\n});\r\n\r\ncontenner.add(controlview);\r\n\r\nvar frmcamera = Ti.UI.createButton({\r\n\tbackgroundImage : 'none',\r\n\tbackgroundColor : '#ff0000',\r\n\ttitle : 'Open Camera',\r\n\tcolor : '#fff',\r\n\twidth : 80,\r\n\theight : 50,\r\n\tleft : 10,\r\n});\r\n\r\nfrmcamera.addEventListener('click', function() {\r\n\tfireUpTheCamera();\r\n});\r\n\r\ncontrolview.add(frmcamera);\r\n\r\nvar overlay = Ti.UI.createView({\r\n\twidth : Ti.UI.FILL,\r\n\theight : Ti.UI.FILL,\r\n\tautorotate: true,\r\n}); \r\n// Create an ImageView.\r\nvar overlayImg = Ti.UI.createImageView({\r\n\timage : '/KS_nav_ui.png',\r\n\twidth : Ti.UI.SIZE,\r\n\theight : Ti.UI.SIZE,\r\n});\r\n\r\n\r\noverlayImg.addEventListener('click', function() {\r\n\tTi.Media.takePicture();\r\n});\r\noverlay.add(overlayImg);\r\n\r\nfunction fireUpTheCamera() {\r\n\tTitanium.Media.showCamera({\r\n\r\n\t\tsuccess : function(event) {\r\n\t\t\tvar cropRect = event.cropRect;\r\n\t\t\tvar image = event.media;\r\n\r\n\t\t\tTi.API.debug('Our type was: ' + event.mediaType);\r\n\t\t\tif (event.mediaType == Ti.Media.MEDIA_TYPE_PHOTO) {\r\n\t\t\t\tanImageView.image = image;\r\n\t\t\t\t//new_upload_profile_picture_update(anImageView.image);\r\n\t\t\t} else {\r\n\t\t\t\talert(\"got the wrong type back =\" + event.mediaType);\r\n\t\t\t}\r\n\t\t},\r\n\t\tcancel : function() {\r\n\t\t},\r\n\t\terror : function(error) {\r\n\t\t\t// create alert\r\n\t\t\tvar a = Titanium.UI.createAlertDialog({\r\n\t\t\t\ttitle : 'Camera'\r\n\t\t\t});\r\n\r\n\t\t\t// set message\r\n\t\t\tif (error.code == Titanium.Media.NO_CAMERA) {\r\n\t\t\t\ta.setMessage('Please run this test on device');\r\n\t\t\t} else {\r\n\t\t\t\ta.setMessage('Unexpected error: ' + error.code);\r\n\t\t\t}\r\n\r\n\t\t\t// show alert\r\n\t\t\ta.show();\r\n\t\t},\r\n\t\tsaveToPhotoGallery : true,\r\n\t\tallowEditing : false,\r\n\t\toverlay : overlay,\r\n\t\tmediaTypes : [Ti.Media.MEDIA_TYPE_PHOTO]\r\n\t});\r\n}\r\n\r\nwin1.open();\r\n{code} ", "updateAuthor": { "name": "nicholas", "key": "nicholas", "displayName": "Nicholas Cooper", "active": true, "timeZone": "Europe/London" }, "created": "2013-11-26T08:58:51.000+0000", "updated": "2013-11-26T09:02:46.000+0000" }, { "id": "288890", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested the above code on Galaxy SII (2.3.6) with 3.2.0.GA. The image does not rotate correctly no matter whether the overlay is set or not.", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-20T21:58:11.000+0000", "updated": "2014-01-20T21:58:11.000+0000" }, { "id": "288949", "author": { "name": "andrew@gstreetmedia.com", "key": "andrew@gstreetmedia.com", "displayName": "Andrew Greenstreet", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I have a pull request that fixes this issue:\r\nhttps://github.com/appcelerator/titanium_mobile/pull/4968\r\n\r\nI have a jar that fixes this if anyone want's it in advance of 3.3\r\n\r\n", "updateAuthor": { "name": "andrew@gstreetmedia.com", "key": "andrew@gstreetmedia.com", "displayName": "Andrew Greenstreet", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-21T02:06:42.000+0000", "updated": "2014-01-21T02:06:42.000+0000" }, { "id": "291504", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~andrew@gstreetmedia.com], thank you. Have you signed a CLA?", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-02-05T22:23:28.000+0000", "updated": "2014-02-05T22:24:22.000+0000" }, { "id": "291518", "author": { "name": "andrew@gstreetmedia.com", "key": "andrew@gstreetmedia.com", "displayName": "Andrew Greenstreet", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Yep.", "updateAuthor": { "name": "andrew@gstreetmedia.com", "key": "andrew@gstreetmedia.com", "displayName": "Andrew Greenstreet", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-02-05T22:40:48.000+0000", "updated": "2014-02-05T22:40:48.000+0000" }, { "id": "294715", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-02-26T00:25:50.000+0000", "updated": "2014-02-26T00:25:50.000+0000" }, { "id": "294869", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Testing steps: \n1. Run this code\n{code}\nvar win1 = Titanium.UI.createWindow({\n backgroundColor : '#fff',\n});\n \nvar contenner = Ti.UI.createView({\n width : Ti.UI.SIZE,\n height : Ti.UI.SIZE,\n top : 0,\n backgroundColor : '#eee',\n borderColor : '#eee',\n layout : 'vertical',\n});\nwin1.add(contenner);\n \nvar anImageView = Ti.UI.createImageView({\n autorotate: true,\n});\ncontenner.add(anImageView);\n \nvar controlview = Ti.UI.createView({\n width : Ti.UI.FILL,\n height : Ti.UI.SIZE,\n top : 20,\n});\n \ncontenner.add(controlview);\n \nvar frmcamera = Ti.UI.createButton({\n backgroundImage : 'none',\n backgroundColor : '#ff0000',\n title : 'Open Camera',\n color : '#fff',\n width : 80,\n height : 50,\n left : 10,\n});\n \nfrmcamera.addEventListener('click', function() {\n fireUpTheCamera();\n});\n \ncontrolview.add(frmcamera);\n \nvar overlay = Ti.UI.createView({\n width : Ti.UI.FILL,\n height : Ti.UI.FILL,\n autorotate: true,\n}); \n// Create an ImageView.\nvar overlayImg = Ti.UI.createImageView({\n image : '/KS_nav_ui.png',\n width : Ti.UI.SIZE,\n height : Ti.UI.SIZE,\n});\n \n \noverlayImg.addEventListener('click', function() {\n Ti.Media.takePicture();\n});\noverlay.add(overlayImg);\n \nfunction fireUpTheCamera() {\n Titanium.Media.showCamera({\n \n success : function(event) {\n var cropRect = event.cropRect;\n var image = event.media;\n \n Ti.API.debug('Our type was: ' + event.mediaType);\n if (event.mediaType == Ti.Media.MEDIA_TYPE_PHOTO) {\n anImageView.image = image;\n //new_upload_profile_picture_update(anImageView.image);\n } else {\n alert(\"got the wrong type back =\" + event.mediaType);\n }\n },\n cancel : function() {\n },\n error : function(error) {\n // create alert\n var a = Titanium.UI.createAlertDialog({\n title : 'Camera'\n });\n \n // set message\n if (error.code == Titanium.Media.NO_CAMERA) {\n a.setMessage('Please run this test on device');\n } else {\n a.setMessage('Unexpected error: ' + error.code);\n }\n \n // show alert\n a.show();\n },\n saveToPhotoGallery : true,\n allowEditing : false,\n overlay : overlay,\n mediaTypes : [Ti.Media.MEDIA_TYPE_PHOTO]\n });\n}\n \nwin1.open();\n{code}\n\n2. Click on open camera button.\n3. Click on button in middle to take picture.\n4. If you don't see the image (likely due to timob-16508), go to gallery and observe the image. Make sure it shows the right orientation\n5. If you see the image, check to see if orientation is correct.", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-02-26T23:32:13.000+0000", "updated": "2014-02-26T23:32:13.000+0000" }, { "id": "294870", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "master PR: https://github.com/appcelerator/titanium_mobile/pull/5392", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-02-26T23:32:39.000+0000", "updated": "2014-02-26T23:32:39.000+0000" }, { "id": "300741", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Above PR closed. New PR\nhttps://github.com/appcelerator/titanium_mobile/pull/5597", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-04-12T02:45:59.000+0000", "updated": "2014-04-12T02:45:59.000+0000" }, { "id": "302141", "author": { "name": "nmittal", "key": "nmittal", "displayName": "Neha Mittal", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Verified fix with below environment:\r\n\r\nAppc Studio: 3.3.0.201404211130\r\nSDK build: 3.3.0.v20140422163054\r\nacs: 1.0.14\r\nnpm: 1.3.2\r\nalloy: 1.4.0-dev\r\nCLI: titanium-3.3.0-dev\r\ntitanium-code-processor:1.1.1-beta1\r\nXcode: 5.1.1\r\nOsx: Mavericks(10.9.2)\r\nDevice: Galaxy Nexus (4.1)\r\n\r\nImage displayed with correct orientation. Hence closing the issue.", "updateAuthor": { "name": "nmittal", "key": "nmittal", "displayName": "Neha Mittal", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2014-04-23T06:53:12.000+0000", "updated": "2014-04-23T06:53:12.000+0000" } ], "maxResults": 19, "total": 19, "startAt": 0 } } }