{ "id": "107307", "key": "TIMOB-12189", "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": "14164", "description": "Release 3.0.2", "name": "Release 3.0.2", "archived": true, "released": true, "releaseDate": "2013-02-19" }, { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" }, { "id": "14803", "description": "2013 Sprint 01 Core", "name": "2013 Sprint 01 Core", "archived": true, "released": true, "releaseDate": "2013-01-14" }, { "id": "14804", "description": "2013 Sprint 01", "name": "2013 Sprint 01", "archived": true, "released": true, "releaseDate": "2013-01-14" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-01-25T11:17:46.000+0000", "created": "2013-01-03T07:56:21.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "blob", "core", "defect", "ios", "module_imageview", "parity", "qe-testadded" ], "versions": [], "issuelinks": [], "assignee": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2014-06-19T12:44:03.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "h2.Problem\r\n\r\nThe blob.imageWithRoundedCorner() method on iOS creates an image with opaque white corners instead of transparenet corners like the Android version does. Therefore, this is a parity issue.\r\n\r\nI have attached two screenshots. The iPhone screenshot shows the white corners in the resulting image in the bottom right corner. The other screenshot is the same code run on the Android emulator, showing the expected result of transparent corners.\r\n\r\nh2.Testcase\r\n\r\nUsing the following app.js code, click the \"Step 1\" button, then the \"Step 2\" button.\r\n\r\n{panel:title=app.js}\r\n{code}\r\nvar win1=Ti.UI.createWindow({backgroundColor:'blue'});\r\n\r\nvar RoundedFile;\r\n\r\nvar PhoneDataDirectory=Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory);\r\nif (! PhoneDataDirectory.exists())\r\n PhoneDataDirectory.createDirectory();\r\n\r\nvar Label1=Ti.UI.createLabel({top:2, left:2, text:'M and Ms',\r\n color:'orange',\r\n backgroundColor:'black'});\r\nwin1.add(Label1);\r\n\r\nfunction Step1()\r\n{\r\n Ti.Media.takeScreenshot(ContinueStep1);\r\n}\r\nvar Step1Button=Ti.UI.createButton({title:'Step 1', left:5, top:'50%'});\r\nwin1.add(Step1Button);\r\nStep1Button.addEventListener('click',Step1);\r\n\r\nfunction ContinueStep1(ScreenShot)\r\n{\r\n var ScreenBlob=ScreenShot.media;\r\n var SectionBlob=ScreenBlob.imageAsCropped({x:0,\r\n y:25,\r\n width:90,\r\n height:50\r\n });\r\n var Rounded=SectionBlob.imageWithRoundedCorner(20);\r\n RoundedFile=Ti.Filesystem.getFile(PhoneDataDirectory.nativePath,'Rounded.png');\r\n RoundedFile.write(Rounded);\r\n Step1Button.title='Done';\r\n}\r\n\r\nfunction Step2()\r\n{\r\n var RoundedImage=Ti.UI.createImageView({image:RoundedFile,\r\n bottom:2, right:2,\r\n width:Ti.UI.SIZE,\r\n height:Ti.UI.SIZE });\r\n win1.add(RoundedImage);\r\n}\r\nvar Step2Button=Ti.UI.createButton({title:'Step 2', left:165, top:'50%'});\r\nwin1.add(Step2Button);\r\nStep2Button.addEventListener('click',Step2);\r\n\r\nwin1.open();\r\n{code}\r\n{panel}\r\n", "attachment": [ { "id": "34522", "filename": "AndroidScreenShot.png", "author": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "created": "2013-01-03T07:57:23.000+0000", "size": 16017, "mimeType": "image/png" }, { "id": "34520", "filename": "iPhoneScreenShot.png", "author": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "created": "2013-01-03T07:56:21.000+0000", "size": 19567, "mimeType": "image/png" } ], "flagged": false, "summary": "iOS: imageWithRoundedCorner() makes opaque corners instead of transparent corners", "creator": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "subtasks": [ { "id": "108475", "key": "TIMOB-12402", "fields": { "summary": "Backport TIMOB-12189 to 3_0_X", "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": "5", "description": "The sub-task of the issue", "name": "Sub-task", "subtask": true } } } ], "reporter": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "environment": "* iOS 6.0 (simulator)\r\n* Mac OSX 10.7.2\r\n* Titanium Mobile SDK 3.0.0.GA\r\n* Titanium Studio 3.0.1.201212181159\r\n", "comment": { "comments": [ { "id": "233011", "author": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "body": "HD ticket: [APP-692179|http://support.appcelerator.com/tickets/APP-692179]", "updateAuthor": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "created": "2013-01-03T08:07:53.000+0000", "updated": "2013-01-03T08:07:53.000+0000" }, { "id": "233440", "author": { "name": "vjoshi", "key": "vjoshi", "displayName": "Varun Joshi", "active": true, "timeZone": "America/New_York" }, "body": "I tried using the ImageFactory module's imageWithRoundedCorner and imageWithTransparentBorder methods to have a rounded corner around the image but I still see the white corners. Below is another sample code with ImageFactory module.\n\nSteps to to reproduce are the same as mentioned in the ticket description.\n\nhttps://gist.github.com/9bd72e8cc6aec73da665", "updateAuthor": { "name": "vjoshi", "key": "vjoshi", "displayName": "Varun Joshi", "active": true, "timeZone": "America/New_York" }, "created": "2013-01-07T13:50:28.000+0000", "updated": "2013-01-07T13:50:28.000+0000" }, { "id": "233580", "author": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR https://github.com/appcelerator/titanium_mobile/pull/3678", "updateAuthor": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-01-08T13:22:43.000+0000", "updated": "2013-01-08T13:22:43.000+0000" }, { "id": "233782", "author": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "body": "Verified fixed with SDK 3.0.1.v20130109180643. Thanks!", "updateAuthor": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "created": "2013-01-10T07:45:14.000+0000", "updated": "2013-01-10T07:45:14.000+0000" }, { "id": "234721", "author": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "body": "The image has transparent corners.\r\nVerified on:\r\nStudio: 3.0.1.201212181159\r\nSDK: 3.1.0.v20130114171802\r\niOS Device: iPhone 5(v6.0), iPhone Simulator (v6.0)\r\nXCode: 4.5.2", "updateAuthor": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-01-17T03:49:01.000+0000", "updated": "2013-01-17T03:49:01.000+0000" }, { "id": "235571", "author": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "body": "Seems I listed the wrong SDK in my \"fixed\" comment...it's fixed in SDK 3.1.0.v20130109175536.\r\n\r\nCan this be merged into 3.0.2 ?", "updateAuthor": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "created": "2013-01-23T20:54:02.000+0000", "updated": "2013-01-23T20:54:02.000+0000" }, { "id": "235627", "author": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "reopen for backporting", "updateAuthor": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-01-23T23:26:05.000+0000", "updated": "2013-01-23T23:26:05.000+0000" }, { "id": "235768", "author": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing.\nTested with:\nTitanium Studio, build: 3.0.1.201212181159\nStudio SDK, build: 3.0.2.v20130124094710\nStudio SDK, build: 3.1.0.v20130124094206\nDevices:\nNexus4 4.2\niPhone4S 5.0.1", "updateAuthor": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-01-24T21:30:42.000+0000", "updated": "2013-01-24T21:30:42.000+0000" }, { "id": "235866", "author": { "name": "amittal", "key": "amittal", "displayName": "Anshu Mittal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Reopening to update labels", "updateAuthor": { "name": "amittal", "key": "amittal", "displayName": "Anshu Mittal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-01-25T11:16:45.000+0000", "updated": "2013-01-25T11:16:45.000+0000" }, { "id": "235870", "author": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "body": "Verified fixed in SDK 3.0.2.v20130124164131. Thanks!", "updateAuthor": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "created": "2013-01-25T13:57:19.000+0000", "updated": "2013-01-25T13:57:19.000+0000" } ], "maxResults": 12, "total": 12, "startAt": 0 } } }