{ "id": "61449", "key": "TIMOB-817", "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": "11243", "name": "Release 1.6.0 M10", "archived": true, "released": true, "releaseDate": "2011-02-21" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:54:20.000+0000", "created": "2011-04-15T02:37:06.000+0000", "priority": { "name": "Trivial", "id": "5" }, "labels": [ "android", "defect", "imageview", "release-1.6.0", "toimage" ], "versions": [], "issuelinks": [], "assignee": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T01:54:20.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": "{html}

As in the following code;

\n
\n    Ti.Media.showCamera ({\n        autoHide:true,\n        allowImageEditing:false,\n        saveToPhotoGallery:false,\n        success:function(e) {\n            var image = e.media;\n            var imageView = Titanium.UI.createImageView({\n                image:image,\n                width:150,\n                height:150\n            });\n\n            image = imageView.toImage();\n        }\n    });\n
{html}", "attachment": [], "flagged": false, "summary": "[Android] imageView.toImage() crashes app", "creator": { "name": "markpeace", "key": "markpeace", "displayName": "Mark Peace", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "markpeace", "key": "markpeace", "displayName": "Mark Peace", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "124123", "author": { "name": "brionvibber", "key": "brionvibber", "displayName": "Brion Vibber", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

I found I could work around the crash by adding the imageView to\na window to fully instantiate it before scaling. However, the\nresulting object isn't a TiBlob, but rather appears to be an\nevent-like object similar to what we get directly from showCamera\n(eg, you need to pull the 'media' property from it to actually get\nthe image).

{html}", "updateAuthor": { "name": "brionvibber", "key": "brionvibber", "displayName": "Brion Vibber", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:37:07.000+0000", "updated": "2011-04-15T02:37:07.000+0000" }, { "id": "124124", "author": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "body": "{html}

This has been fixed by \n#1659; first adding the imageview to the window to fully\ninstantiate it shouldn't be necessary anymore.

\n

And yes, you are correct in that you need to pull the \"media\"\nproperty from it to get the actual image. I just recently created\n\n#3268 to deal with this inconsistency between the\nplatforms.

{html}", "updateAuthor": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "created": "2011-04-15T02:37:07.000+0000", "updated": "2011-04-15T02:37:07.000+0000" }, { "id": "124125", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Marking resolved due to fix with #1659

{html}", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:37:07.000+0000", "updated": "2011-04-15T02:37:07.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }