{ "id": "160271", "key": "TIMOB-23421", "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": "17706", "name": "Release 5.4.0", "archived": false, "released": true, "releaseDate": "2016-08-11" } ], "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2016-05-23T13:45:30.000+0000", "created": "2016-05-16T17:16:40.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "base64decode", "imageView", "qe-5.4.0", "windows" ], "versions": [], "issuelinks": [ { "id": "51783", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "outwardIssue": { "id": "159810", "key": "TIMOB-23273", "fields": { "summary": "Windows: Cannot set Blob as image on ImageView", "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": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "updated": "2016-06-24T20:50:28.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": "12642", "name": "Windows", "description": "Windows authoring support" } ], "description": "h2. Problem\r\n\r\nWe dynamically create images in our applications. In iOS & Android we create the blob and assign it to the image view. This does not work in Windows 8.1 or 10. The documentation http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.ImageView states that this feature is unavailable for Web, but makes no mention of Windows. The expected functionality is that we should be able to assign a blob to an image view Windows as we do iOS & Android. We have found a work around by saving the blob to disk and then opening it but we do not feel that is an acceptable solution considering the amount of drawables we create. \r\n\r\nh2. Test case\r\n\r\nThe code below will display image inside of a view. This is working on iOS & Android, but not windows. \r\n\r\n!http://i.imgur.com/tzOkTIS.png!\r\n\r\n{code:lang=javascript|title=index.js}\r\nvar newView = Titanium.UI.createView({\r\n backgroundColor: \"#9f9ab5\",\r\n width: 200,\r\n height: 200,\r\n top: 10,\r\n});\r\n\r\nvar encodedImage = 'R0lGODdhUwBTAIAAAAAAAP///ywAAAAAUwBTAAAC/4yPqcvtD6OctNqLs968PwCG4kgeZGiC08mWSwurRpsCa0y/OFu7ASrZ8XS2oOw3jACRReUxsYQsc85m9PNEXB3TpPS4bYSZvVHtPDOnrWry2jfuntBuprzMzsOzdOr9DRYo0pcUJ7inJ6jgd9hmmDi4hkeH92fnyCcJGFmHuFjYyPlYqVjhqXkpmtkJ2nSjmkcaSyRLaQRLOIcKtUq7u0lly7U65lsn6yMsRtz7Oasl5PzKIKTL+mxZnQytnV16jRxD3e2N/U1e7LFl6dG+7Iqa7t6+/j3vXG/9Hg5/Hcydb5sxHNKAteHFqRYWSALl/CtYZdIvIgQnjuu3b5MyhP8Vjw3DeFGiR4riLAJsJS/Vw4bNTloTiK+kS4gLGSW82FHkRog542FieJBjS4defOIyeHPmR348fzLF2VIY0X5TM6ZSaDVXPp0IRT7sCvZqWJhGp45aGBOkWHBjh0YN2OvUSHbGsmqEao6qvYhC1abkuhYDXL9RAZOd1tfux8EbOqakSzLvLZtfnr0rN7lV5Z1e93aGITUUuVx4n84V3Y10ZNNbkVZTfQ9z4tJ3Y5/jcxjR3wuyla6u3fd1zWhlC7sUvpi4P+P8vgaXWZXC7uUvQ10OqtiqY+t4d0836xT4c7Vtq0NKm3Yl9uJHA4tXWdS91vDyWe5AP1Dz7OO4UVth5oYVY+M1ZV5ISIWWlHpA/TdfexkcBpuB8DFoAYRGoXWgSdKtVx6GfE3YYHR1jbhUhtSJSBOJ2ukH4nucTbgdaK71lyCH6PgHXo06PjLajAsK6Ns9Qg5JZJFGHolkku0UAAA7';\r\nvar decodedImage = Ti.Utils.base64decode(encodedImage);\r\n\r\nvar theImage = Ti.UI.createImageView({\r\n image: decodedImage,\r\n width: 100,\r\n height: 100,\r\n right: 50\r\n});\r\n\r\nnewView.add(theImage);\r\n\r\n$.index.add(newView);\r\n\r\n$.index.open();\r\n{code}\r\n\r\n\r\n{code:lang=javascript|title=unacceptable_work_around.js}\r\nvar newView = Titanium.UI.createView({\r\n backgroundColor: \"#9f9ab5\",\r\n width: 200,\r\n height: 200,\r\n top: 10,\r\n});\r\n\r\nvar encodeImage = 'R0lGODdhUwBTAIAAAAAAAP///ywAAAAAUwBTAAAC/4yPqcvtD6OctNqLs968PwCG4kgeZGiC08mWSwurRpsCa0y/OFu7ASrZ8XS2oOw3jACRReUxsYQsc85m9PNEXB3TpPS4bYSZvVHtPDOnrWry2jfuntBuprzMzsOzdOr9DRYo0pcUJ7inJ6jgd9hmmDi4hkeH92fnyCcJGFmHuFjYyPlYqVjhqXkpmtkJ2nSjmkcaSyRLaQRLOIcKtUq7u0lly7U65lsn6yMsRtz7Oasl5PzKIKTL+mxZnQytnV16jRxD3e2N/U1e7LFl6dG+7Iqa7t6+/j3vXG/9Hg5/Hcydb5sxHNKAteHFqRYWSALl/CtYZdIvIgQnjuu3b5MyhP8Vjw3DeFGiR4riLAJsJS/Vw4bNTloTiK+kS4gLGSW82FHkRog542FieJBjS4defOIyeHPmR348fzLF2VIY0X5TM6ZSaDVXPp0IRT7sCvZqWJhGp45aGBOkWHBjh0YN2OvUSHbGsmqEao6qvYhC1abkuhYDXL9RAZOd1tfux8EbOqakSzLvLZtfnr0rN7lV5Z1e93aGITUUuVx4n84V3Y10ZNNbkVZTfQ9z4tJ3Y5/jcxjR3wuyla6u3fd1zWhlC7sUvpi4P+P8vgaXWZXC7uUvQ10OqtiqY+t4d0836xT4c7Vtq0NKm3Yl9uJHA4tXWdS91vDyWe5AP1Dz7OO4UVth5oYVY+M1ZV5ISIWWlHpA/TdfexkcBpuB8DFoAYRGoXWgSdKtVx6GfE3YYHR1jbhUhtSJSBOJ2ukH4nucTbgdaK71lyCH6PgHXo06PjLajAsK6Ns9Qg5JZJFGHolkku0UAAA7';\r\nvar decodedImage = Ti.Utils.base64decode(encodeImage);\r\nvar fileName = 'test' + '.gif';\r\nvar imageFile = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, fileName);\r\nimageFile.write(decodedImage);\r\n\r\nvar theImage = Ti.UI.createImageView({\r\n image: imageFile.nativePath,\r\n width: 100,\r\n height: 100,\r\n right: 50\r\n});\r\n\r\nnewView.add(theImage);\r\n\r\n$.index.add(newView);\r\n\r\n$.index.open();\r\n{code}\r\n\r\nh2. Logs\r\n\r\n\r\nh2. Discussions\r\n\r\n\r\n", "attachment": [], "flagged": false, "summary": "Windows: Titanium.UI.ImageView, can not load image from blob. ", "creator": { "name": "kdclaw3@gmail.com", "key": "kdclaw3@gmail.com", "displayName": "Dee Clawson", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "kdclaw3@gmail.com", "key": "kdclaw3@gmail.com", "displayName": "Dee Clawson", "active": true, "timeZone": "America/New_York" }, "environment": "Ti SDK: 5.3.0.v20160503133640", "comment": { "comments": [ { "id": "385867", "author": { "name": "nsalahin", "key": "nsalahin", "displayName": "Nazmus Salahin", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Hello,\r\n\r\nI am able to reproduce this issue with following code. On Windows for this code image view is not loaded with the image. It is apparent that blob data is not supported in {{image}} property of {{ImageView}} but it is not mentioned in thedocumentation. \r\n*Code:*\r\n{code}\r\nTitanium.UI.setBackgroundColor('#000');\r\n\r\nvar win = Titanium.UI.createWindow({\r\n\ttitle : 'Tab 1',\r\n\tbackgroundColor : '#fff'\r\n});\r\n\r\nvar encodedImage = 'R0lGODdhUwBTAIAAAAAAAP///ywAAAAAUwBTAAAC/4yPqcvtD6OctNqLs968PwCG4kgeZGiC08mWSwurRpsCa0y/OFu7ASrZ8XS2oOw3jACRReUxsYQsc85m9PNEXB3TpPS4bYSZvVHtPDOnrWry2jfuntBuprzMzsOzdOr9DRYo0pcUJ7inJ6jgd9hmmDi4hkeH92fnyCcJGFmHuFjYyPlYqVjhqXkpmtkJ2nSjmkcaSyRLaQRLOIcKtUq7u0lly7U65lsn6yMsRtz7Oasl5PzKIKTL+mxZnQytnV16jRxD3e2N/U1e7LFl6dG+7Iqa7t6+/j3vXG/9Hg5/Hcydb5sxHNKAteHFqRYWSALl/CtYZdIvIgQnjuu3b5MyhP8Vjw3DeFGiR4riLAJsJS/Vw4bNTloTiK+kS4gLGSW82FHkRog542FieJBjS4defOIyeHPmR348fzLF2VIY0X5TM6ZSaDVXPp0IRT7sCvZqWJhGp45aGBOkWHBjh0YN2OvUSHbGsmqEao6qvYhC1abkuhYDXL9RAZOd1tfux8EbOqakSzLvLZtfnr0rN7lV5Z1e93aGITUUuVx4n84V3Y10ZNNbkVZTfQ9z4tJ3Y5/jcxjR3wuyla6u3fd1zWhlC7sUvpi4P+P8vgaXWZXC7uUvQ10OqtiqY+t4d0836xT4c7Vtq0NKm3Yl9uJHA4tXWdS91vDyWe5AP1Dz7OO4UVth5oYVY+M1ZV5ISIWWlHpA/TdfexkcBpuB8DFoAYRGoXWgSdKtVx6GfE3YYHR1jbhUhtSJSBOJ2ukH4nucTbgdaK71lyCH6PgHXo06PjLajAsK6Ns9Qg5JZJFGHolkku0UAAA7';\r\n\r\nvar decodedImage = Ti.Utils.base64decode(encodedImage);\r\n\r\nvar theImage = Ti.UI.createImageView({\r\n\r\n\timage : decodedImage,\r\n\r\n\twidth : 100,\r\n\r\n\theight : 100,\r\n\r\n\tright : 50\r\n\r\n});\r\n\r\nwin.add(theImage);\r\n\r\nwin.open();\r\n\r\n\r\n{code}\r\n\r\nThanks\r\n*Environment*:\r\n\r\n*OS :* Microsoft Windows 8.1 Enterprise N\r\n*Device info:* Microsoft Lumia 640 (Windows Phone 8.1)\r\n*Node.js Version:* 0.12.7\r\n*npm Version:* 2.11.3\r\n*Titanium SDKs:* 5.3.0.v20160404105211\r\n*Java Development Kit Version:* 1.8.0_73\r\n*Titanium CLI Version:* 5.0.5\r\n*Appcelerator CLI Version:* 5.2.2\r\n*Appcelerator Studio:* 4.5.0", "updateAuthor": { "name": "nsalahin", "key": "nsalahin", "displayName": "Nazmus Salahin", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2016-05-17T06:05:32.000+0000", "updated": "2016-05-17T06:05:32.000+0000" }, { "id": "386442", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "This is a duplicate of TIMOB-23273 - the fix is already on the master branch. You can try it out with {{appc ti sdk install -b master}}", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2016-05-23T13:45:30.000+0000", "updated": "2016-05-23T13:45:30.000+0000" }, { "id": "389053", "author": { "name": "jlongton", "key": "jlongton", "displayName": "Josh Longton", "active": true, "timeZone": "Europe/London" }, "body": "Closing as a duplicate of TIMOB-23273.\r\nTested on:\r\nMicrosoft Lumia 640 (8.1)\r\nWindows Simulator (8.1)\r\nMicrosoft Lumia 640 (10)\r\nWindows Simulator (10)\r\nWindows 10 Pro\r\nStudio: 4.7.0.201606150733\r\nTi SDK: 5.4.0.v20160617074028\r\nAppc NPM: 4.2.7-2\r\nApp CLI: 5.4.0-18\r\nNode v4.4.4\r\n*Closing Ticket.*", "updateAuthor": { "name": "jlongton", "key": "jlongton", "displayName": "Josh Longton", "active": true, "timeZone": "Europe/London" }, "created": "2016-06-24T20:49:15.000+0000", "updated": "2016-06-24T20:50:10.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }