{ "id": "81894", "key": "TIMOB-6908", "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": [], "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2017-04-21T01:30:16.000+0000", "created": "2011-10-24T12:50:25.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [ { "id": "11570", "description": "", "name": "Release 1.7.2", "archived": true, "released": true, "releaseDate": "2011-07-21" } ], "issuelinks": [ { "id": "54746", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "166459", "key": "TIMOB-24465", "fields": { "summary": "Android: ImageView quality (gradient banding)", "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": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-04-21T01:30:16.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": "h2. Problem\r\n\r\nOn Android, PNGs containing transparency/semi-transparency (such as shadows and glow) look very bad compared to both the iPhone version and the Photoshop reference mockup (see attached screenshots).\r\n\r\nThe PNGs are normal 32bit (RGBA) straight from Photoshop and looks fine in iPhone simulator. On Android both the emulator and device (HTC Legend) are affected. \r\n\r\nh2. Test case\r\n\r\nThe test is made up of a Window with a background PNG, and two child views with unscaled background PNG's with both solid and semi-transparent content.\r\n\r\nAssets are attached\r\n\r\n{code:lang=javascript|title=app.js}\r\nvar win = Ti.UI.createWindow({\r\n backgroundImage:'bg.png',\r\n});\r\n \r\nvar shadow = Ti.UI.createView({\r\n backgroundImage:'shadow.png',\r\n width:'179dp',\r\n height:'179dp',\r\n top:'25dp',\r\n});\r\n \r\nvar glow = Ti.UI.createView({\r\n backgroundImage:'glow.png',\r\n width:'189dp',\r\n height:'189dp',\r\n bottom:'15dp',\r\n});\r\n \r\nwin.add(shadow);\r\nwin.add(glow);\r\nwin.open();\r\n{code}\r\n\r\nh2. Discussions\r\n\r\nQ&A: [severe android png rendering bug|http://developer.appcelerator.com/question/127038/severe-android-png-rendering-bug]\r\n\r\n", "attachment": [ { "id": "23846", "filename": "png_assets.zip", "author": { "name": "rune_lh", "key": "rune_lh", "displayName": "Rune Lund-Hermansen", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-10-24T12:50:25.000+0000", "size": 25919, "mimeType": "application/zip" }, { "id": "23845", "filename": "TI_android_PNG_Bug.jpg", "author": { "name": "rune_lh", "key": "rune_lh", "displayName": "Rune Lund-Hermansen", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-10-24T12:50:25.000+0000", "size": 289754, "mimeType": "image/jpeg" } ], "flagged": false, "summary": "Android: png image file transparency problem", "creator": { "name": "rune_lh", "key": "rune_lh", "displayName": "Rune Lund-Hermansen", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "rune_lh", "key": "rune_lh", "displayName": "Rune Lund-Hermansen", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "* Titanium SDK version: 1.7.2\r\n* Android 2.2\r\n* Device: Android emulator and HTC Legend\r\n* Host: OSX", "comment": { "comments": [ { "id": "230879", "author": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "http://www.curious-creature.org/2010/12/08/bitmap-quality-banding-and-dithering/\r\n{quote}\r\nSimple performance test shows very clearly that using a compatible format (32 bits bitmap on a 32 bits window or 16 bits/565 bitmap on a 16 bits window) is the most efficient way to draw bitmaps. For this reason, you should always check the format of your bitmaps and windows and try to make them compatible with each other.\r\n{quote}\r\n\r\nThis code in onCreate() may work:\r\n{code}\r\n// set 32 bit window (draw correctly transparent images)\r\ngetWindow().getAttributes().format = android.graphics.PixelFormat.RGBA_8888;\r\n{code}\r\n\r\nWorkaround: ship 16-bit PNGs for android", "updateAuthor": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-12-11T19:10:32.000+0000", "updated": "2012-12-11T19:10:32.000+0000" }, { "id": "417815", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing because it is a duplicate of [TIMOB-24465] which will be resolved soon.", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-04-21T01:30:16.000+0000", "updated": "2017-04-21T01:30:16.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }