{ "id": "170180", "key": "TIMOB-25459", "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": "17609", "description": "", "name": "Release 7.0.0", "archived": false, "released": true, "releaseDate": "2017-12-07" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-11-10T01:05:07.000+0000", "created": "2017-10-30T13:28:08.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "Android", "toImage" ], "versions": [], "issuelinks": [], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2017-11-15T05:26:33.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 use toImage method on View we have a discrepance between iOS and the Android / Windows callback parameter\r\n\r\nSample:\r\nindex.js\r\n\r\n{code:javascript}\r\n$.addListener($.index, 'postlayout', function (e) {\r\n $.box.toImage(function (e) {\r\n if (OS_IOS) {\r\n //e is a Event object who has a blob key: e.blob\r\n $.img.setImage(e.blob);\r\n } else if (OS_ANDROID || OS_WINDOWS) {\r\n //e is a Ti.Blob instead a Event object\r\n //e.blob -> undefined\r\n $.img.setImage(e);\r\n }\r\n });\r\n});\r\n\r\n$.index.open();\r\n{code}\r\n\r\nindex.xml\r\n\r\n{code:xml}\r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n{code}", "attachment": [], "flagged": false, "summary": "iOS: toImage method needs parity with Android & Windows", "creator": { "name": "jormagar", "key": "jormagar", "displayName": "Jorge Macias Garcia", "active": true, "timeZone": "Europe/Brussels" }, "subtasks": [], "reporter": { "name": "jormagar", "key": "jormagar", "displayName": "Jorge Macias Garcia", "active": true, "timeZone": "Europe/Brussels" }, "environment": null, "comment": { "comments": [ { "id": "429832", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "This should be a doc-ticket. No callback should return values directly but inside a dictionary. Please confirm that Android also works with \"e.blob\", otherwise Android needs an adjustment.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-10-30T13:48:41.000+0000", "updated": "2017-10-30T13:48:41.000+0000" }, { "id": "429833", "author": { "name": "jormagar", "key": "jormagar", "displayName": "Jorge Macias Garcia", "active": true, "timeZone": "Europe/Brussels" }, "body": "No, Android doesn't works with e.blob notation.", "updateAuthor": { "name": "jormagar", "key": "jormagar", "displayName": "Jorge Macias Garcia", "active": true, "timeZone": "Europe/Brussels" }, "created": "2017-10-30T13:52:47.000+0000", "updated": "2017-10-30T13:52:47.000+0000" }, { "id": "429836", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "To be considered for 7.0.0 as it's a breaking change.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-10-30T14:33:00.000+0000", "updated": "2017-10-30T14:33:00.000+0000" }, { "id": "430059", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/9583\r\n\r\nTest-Case:\r\n{code:js}\r\nvar win = Ti.UI.createWindow();\r\nvar view = Ti.UI.createView({backgroundColor: 'green', width: 150, height: 150, top: 100});\r\nvar content = Ti.UI.createView({backgroundColor: 'blue', width: 45, height: 45});\r\nvar imageView = Ti.UI.createImageView({width: 150, height: 150, top: 300});\r\nview.add(content);\r\nwin.add(view);\r\nwin.addEventListener('postlayout', function() {\r\n\tview.toImage(function(blob) {\r\n\t\timageView.setImage(blob);\r\n\t});\r\n})\r\nwin.add(imageView);\r\nwin.open();\r\n{code}", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-11-03T11:31:53.000+0000", "updated": "2017-11-03T11:31:53.000+0000" }, { "id": "430350", "author": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Passed. PR merged.", "updateAuthor": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-11-09T18:01:53.000+0000", "updated": "2017-11-10T01:04:55.000+0000" }, { "id": "430442", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~bimmel] This is a breaking change, we should add it to the list of major changes.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-11-11T11:28:29.000+0000", "updated": "2017-11-11T11:28:29.000+0000" }, { "id": "430520", "author": { "name": "bimmel-defective", "key": "bimmel", "displayName": "(deactived) Brian Immel", "active": false, "timeZone": "America/Los_Angeles" }, "body": "[~hknoechel], consider it done.\r\n", "updateAuthor": { "name": "bimmel-defective", "key": "bimmel", "displayName": "(deactived) Brian Immel", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-11-13T18:07:43.000+0000", "updated": "2017-11-13T18:07:43.000+0000" }, { "id": "430656", "author": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Changes are in SDK 7.0.0.v20171114202841.", "updateAuthor": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-11-15T05:26:25.000+0000", "updated": "2017-11-15T05:26:25.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }