{ "id": "154430", "key": "TIMOB-20257", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "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-02-05T14:32:18.000+0000", "created": "2016-01-20T13:51:30.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "windows", "windows_phone" ], "versions": [ { "id": "16997", "name": "Release 5.2.0", "archived": false, "released": true, "releaseDate": "2016-02-23" } ], "issuelinks": [ { "id": "50534", "type": { "id": "10001", "name": "Cloners", "inward": "is cloned into", "outward": "is cloned from" }, "inwardIssue": { "id": "154769", "key": "TIMOB-20354", "fields": { "summary": "Windows: Support Ti.Blob.imageWith* methods", "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": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } }, { "id": "51789", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "160438", "key": "TIMOB-23425", "fields": { "summary": "Windows: Ti.Blob.imageAs* methods crash the application when using a blob that does not represent an image", "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": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2018-10-10T16:30:05.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": "On windows phone I have to make some image manipulation, in my case I want to resize/reduce quality of an image before upload it on my server. On Android/iOS I use [ti.imagefactory|http://gitt.io/component/ti.imagefactory] and everything works as expected with this function that I made for a little manipulation on the image before upload it:\r\n{code:javascript}\r\nAlloy.Globals.imageMaxDimensione = 500;\r\nAlloy.Globals.imageQuality = 0.9;\r\n\r\nfunction resizeImageForUpload(imageBlob){\r\n\t_altezza = imageBlob.getHeight(); \r\n\t_larghezza = imageBlob.getWidth();\r\n\t_newLarghezza = 0; _newAltezza = 0;\r\n\tif(_altezza > _larghezza){ //portrait\r\n\t\t_newAltezza = Alloy.Globals.imageMaxDimensione;\r\n\t\t_newLarghezza = Math.floor(Alloy.Globals.imageMaxDimensione*_larghezza/_altezza);\r\n\t} else { //sono in landscape\r\n\t\t_newLarghezza = Alloy.Globals.imageMaxDimensione;\r\n\t\t_newAltezza = Math.floor(Alloy.Globals.imageMaxDimensione*_altezza/_larghezza);\r\n\t}\r\n\t\r\n\tvar ImageFactory = require('ti.imagefactory');\r\n\tvar dict = {\r\n\t\twidth: _newLarghezza,\r\n\t\theight: _newAltezza,\r\n\t\tquality: Alloy.Globals.imageQuality\r\n\t};\r\n\tnewBlob = ImageFactory.imageAsResized(imageBlob,dict);\r\n\treturn newBlob;\r\n}\r\n{code}\r\nbut on windows phone I haven't ti.imagefactory library. As a workaround I could use [Titanium.Blob.imageAsResized|http://docs.appcelerator.com/platform/latest/#!/api/Titanium.Blob-method-imageAsResized] but this function is not supported on Windows Phone.\r\n\r\nIs it possible to include in future update a compatibility with Windows Phone for the function used to manipulate images? The best in this case will be ti.imagefactory also for Windows Phone.", "attachment": [], "flagged": false, "summary": "Windows: Support Ti.Blob.imageAs* methods", "creator": { "name": "AlbWebbergate", "key": "albwebbergate", "displayName": "Alberto Bonacina", "active": true, "timeZone": "Europe/Rome" }, "subtasks": [], "reporter": { "name": "AlbWebbergate", "key": "albwebbergate", "displayName": "Alberto Bonacina", "active": true, "timeZone": "Europe/Rome" }, "environment": "Titanium Studio 4.4.0.201511241829\r\nOperating system Windows 8.1 Pro 64 bit\r\nNodejs version 4.2.4\r\nTitanium cli version 5.0.5\r\nTitanium SDK 5.1.1GA platforms (android, mobileweb, windows)\r\nVisual studio Community 2013 Update 5\r\nWindows Phone SDK 8.0 (Installed with Visual Studio)\r\nWindows Phone Emulator 8.1 ENU\r\nWindows Phone Emulator 8.1 SDK and Emulators\r\nHyper-V Enabled", "closedSprints": [ { "id": 580, "state": "closed", "name": "2016 Sprint 3 SDK", "startDate": "2016-01-30T01:31:48.991Z", "endDate": "2016-02-13T01:31:00.000Z", "completeDate": "2016-02-15T05:32:40.725Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "374942", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "Some possible pointers on resizing/scaling/cropping using WinRT APIs:\r\n- https://social.msdn.microsoft.com/Forums/en-US/2437d485-ac7c-4a94-bfba-2e4b8e8039cf/high-quality-image-resizing-in-winrt?forum=winappswithcsharp\r\n- http://stackoverflow.com/questions/12349611/how-to-resize-image-in-c-sharp-winrt-winmd\r\n\r\nWe may want to transform this ticket into supporting Ti.Blob.imageAsResized( width, height ) and Ti.Blob.imageAsCropped( options ):\r\n- http://docs.appcelerator.com/platform/latest/#!/api/Titanium.Blob-method-imageAsResized\r\n- http://docs.appcelerator.com/platform/latest/#!/api/Titanium.Blob-method-imageAsCropped\r\n", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2016-01-20T16:58:21.000+0000", "updated": "2016-01-20T16:58:21.000+0000" }, { "id": "375996", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "body": "https://github.com/appcelerator/titanium_mobile_windows/pull/547", "updateAuthor": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-02-04T08:06:12.000+0000", "updated": "2016-02-04T08:06:12.000+0000" }, { "id": "376112", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "[~bimmel] Please note that Ti.Blob.imageAsThumbnail doesn't support/ignores the borderSize and cornerRadius arguments.\r\n\r\n[~gmathews] Can we specify constraints/notes like this in the xml files in acidic folder? How would we add details like this?", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2016-02-05T14:31:51.000+0000", "updated": "2016-02-05T14:31:51.000+0000" }, { "id": "386501", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "[~kota] [~cwilliams] While testing this I found the following issue TIMOB-23425 where the application crashes when the blob used does not represent a blob, according to the docs the method should just return null. Should this be fixed for 5.3.0?", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2016-05-23T18:09:40.000+0000", "updated": "2016-05-23T18:09:40.000+0000" }, { "id": "386552", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "[~eharris] I'd argue that it's not a regression and the workaround is to not call it for non-images :) But it certainly is a bad bug and we should fix it for 5.4.0 if we can...", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2016-05-23T23:10:57.000+0000", "updated": "2016-05-23T23:10:57.000+0000" }, { "id": "386655", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "Agreed (y) Just wanted to be 100% sure it was a post 5.3.0 ticket. I'll go ahead and close this.\r\n\r\nWindows 10 Pro \r\nVisual Studio 2015 Community Update 2 \r\nAppc Core: 5.3.0-46 \r\nAppc NPM: 4.2.5-5 \r\nTi SDK: 5.3.0.v20160523083840\r\nLumia 520 8.1, Lumia 930 10.0\r\n\r\nTi.Blob.imageAs methods are now implemented and work as expected\r\n\r\nClosing ticket", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2016-05-24T18:08:36.000+0000", "updated": "2016-05-24T18:08:36.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }