{ "id": "126862", "key": "TIMOB-16508", "fields": { "issuetype": { "id": "7", "description": "gh.issue.story.desc", "name": "Story", "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": "15939", "description": "2014 Sprint 07", "name": "2014 Sprint 07", "archived": true, "released": true, "releaseDate": "2014-04-11" }, { "id": "15940", "description": "2014 Sprint 07 SDK", "name": "2014 Sprint 07 SDK", "archived": true, "released": true, "releaseDate": "2014-04-11" } ], "resolution": { "id": "2", "description": "The problem described is an issue which will never be fixed.", "name": "Won't Fix" }, "resolutiondate": "2014-04-12T02:45:01.000+0000", "created": "2014-02-26T00:13:41.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [], "versions": [ { "id": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" } ], "issuelinks": [ { "id": "54636", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "166770", "key": "TIMOB-24528", "fields": { "summary": "Android: Fails to load images that exceed GPU max texture size", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-24T00:03:10.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": "After taking photo using camera, the image doesn't show up when bitmap is added to imageView. Log shows this error: \"bitmap too large to be uploaded into a texture\".\r\n{code}\r\nvar win1 = Titanium.UI.createWindow({\r\n backgroundColor : '#fff',\r\n});\r\n \r\nvar contenner = Ti.UI.createView({\r\n width : Ti.UI.SIZE,\r\n height : Ti.UI.SIZE,\r\n top : 0,\r\n backgroundColor : '#eee',\r\n borderColor : '#eee',\r\n layout : 'vertical',\r\n});\r\nwin1.add(contenner);\r\n \r\nvar anImageView = Ti.UI.createImageView({\r\n autorotate: true,\r\n});\r\ncontenner.add(anImageView);\r\n \r\nvar controlview = Ti.UI.createView({\r\n width : Ti.UI.FILL,\r\n height : Ti.UI.SIZE,\r\n top : 20,\r\n});\r\n \r\ncontenner.add(controlview);\r\n \r\nvar frmcamera = Ti.UI.createButton({\r\n backgroundImage : 'none',\r\n backgroundColor : '#ff0000',\r\n title : 'Open Camera',\r\n color : '#fff',\r\n width : 80,\r\n height : 50,\r\n left : 10,\r\n});\r\n \r\nfrmcamera.addEventListener('click', function() {\r\n fireUpTheCamera();\r\n});\r\n \r\ncontrolview.add(frmcamera);\r\n \r\nvar overlay = Ti.UI.createView({\r\n width : Ti.UI.FILL,\r\n height : Ti.UI.FILL,\r\n autorotate: true,\r\n}); \r\n// Create an ImageView.\r\nvar overlayImg = Ti.UI.createImageView({\r\n image : '/KS_nav_ui.png',\r\n width : Ti.UI.SIZE,\r\n height : Ti.UI.SIZE,\r\n});\r\n \r\n \r\noverlayImg.addEventListener('click', function() {\r\n Ti.Media.takePicture();\r\n});\r\noverlay.add(overlayImg);\r\n \r\nfunction fireUpTheCamera() {\r\n Titanium.Media.showCamera({\r\n \r\n success : function(event) {\r\n var cropRect = event.cropRect;\r\n var image = event.media;\r\n \r\n Ti.API.debug('Our type was: ' + event.mediaType);\r\n if (event.mediaType == Ti.Media.MEDIA_TYPE_PHOTO) {\r\n anImageView.image = image;\r\n //new_upload_profile_picture_update(anImageView.image);\r\n } else {\r\n alert(\"got the wrong type back =\" + event.mediaType);\r\n }\r\n },\r\n cancel : function() {\r\n },\r\n error : function(error) {\r\n // create alert\r\n var a = Titanium.UI.createAlertDialog({\r\n title : 'Camera'\r\n });\r\n \r\n // set message\r\n if (error.code == Titanium.Media.NO_CAMERA) {\r\n a.setMessage('Please run this test on device');\r\n } else {\r\n a.setMessage('Unexpected error: ' + error.code);\r\n }\r\n \r\n // show alert\r\n a.show();\r\n },\r\n saveToPhotoGallery : true,\r\n allowEditing : false,\r\n overlay : overlay,\r\n mediaTypes : [Ti.Media.MEDIA_TYPE_PHOTO]\r\n });\r\n}\r\n \r\nwin1.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "Android: Image doesn't show after taking photo with camera", "creator": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Galaxy Nexus 4.2.2", "comment": { "comments": [ { "id": "294714", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "master PR: https://github.com/appcelerator/titanium_mobile/pull/5385", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-02-26T00:24:07.000+0000", "updated": "2014-02-26T00:24:07.000+0000" }, { "id": "300739", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Going to mark this as Wont Fix", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-04-12T02:38:55.000+0000", "updated": "2014-04-12T02:38:55.000+0000" }, { "id": "300740", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "The results from a camera callback have a blob which can give you image dimensions.\nTake a 1024x1024 image for example. If you load this large a bitmap into memory it is going to take at best 2MB(RGB565) or at worst 4MB(ARGB888) of memory. You really shouldn't be loading that much data. Newer devices of course produce images with much higher resolution.\nTi.Blob has methods to resize and load smaller images into memory. \nDevelopers should use that instead.\n\n", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-04-12T02:44:54.000+0000", "updated": "2014-04-12T02:44:54.000+0000" }, { "id": "415191", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as \"Won't Fix\".", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-22T23:00:28.000+0000", "updated": "2017-03-22T23:00:28.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }