{ "id": "155847", "key": "TIMOB-20609", "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": "17707", "name": "Release 5.3.0", "archived": false, "released": true, "releaseDate": "2016-06-04" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2016-03-28T13:25:27.000+0000", "created": "2016-03-20T09:01:29.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "filesystem", "image", "qe-5.3.0", "windows_phone" ], "versions": [ { "id": "16997", "name": "Release 5.2.0", "archived": false, "released": true, "releaseDate": "2016-02-23" } ], "issuelinks": [ { "id": "51158", "type": { "id": "10001", "name": "Cloners", "inward": "is cloned into", "outward": "is cloned from" }, "inwardIssue": { "id": "159070", "key": "TIMOB-23115", "fields": { "summary": "Windows: ImageView.image doesn't handle Ti.File/Blob", "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": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } } ], "assignee": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2016-04-19T23:05:18.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": "It's affected 5.2.0. Tested on emulator and on real device (same behaviour)\r\n\r\nWhat doing this sample app: copy .png file from Resources folder to dataDirectory and try to set copied image to imageView;\r\n\r\n*index.js:*\r\n{code:javascript}\r\nvar directory = (Ti.Filesystem.isExternalStoragePresent()) ? Ti.Filesystem.externalStorageDirectory : Ti.Filesystem.applicationDataDirectory;\r\nvar fileIndex = 0;\r\nvar toFile;\r\n\r\nfunction listFiles() {\r\n if(OS_WINDOWS) {\r\n \talert(Ti.Filesystem.getFile(directory).getDirectoryListing());\r\n } else {\r\n \tconsole.warn(Ti.Filesystem.getFile(directory).getDirectoryListing());\t\r\n } \r\n}\r\n\r\nfunction copyFile() {\r\n\tfileIndex++;\r\n\tvar fromFile = Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, \"test.png\");\r\n\ttoFile = Ti.Filesystem.getFile(directory, '' + fileIndex + '.png');\r\n\ttoFile.write(fromFile.read());\r\n}\r\nfunction onImageClick() {\r\n\t$.imageView.image = toFile;\r\n // below another approaches\r\n // $.imageView.image = toFile.read();\r\n // $.imageView.image = toFile.nativePath;\r\n // $.imageView.image = directory + '/' + fileIndex + '.png';\r\n}\r\n\r\n$.win.open();\r\n{code}\r\n\r\n*index.xml:*\r\n{noformat}\r\n\r\n \r\n\t\t