{ "id": "166459", "key": "TIMOB-24465", "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": "18414", "description": "", "name": "Release 6.2.0", "archived": false, "released": true, "releaseDate": "2017-09-13" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-05-03T08:24:23.000+0000", "created": "2017-03-07T17:56:50.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "android", "banding", "imageview", "quality" ], "versions": [], "issuelinks": [ { "id": "54746", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "81894", "key": "TIMOB-6908", "fields": { "summary": "Android: png image file transparency problem", "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": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-09-01T08:41:08.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": [], "description": "ImagesViews in my app have poor quality, seems that a reduced palette is used.\r\nThis didn't happen when the same image is used as backgroundImage.\r\n\r\nOpen attached \"banding_evidence.jpg\" at full size on a contrasted screen.\r\n\r\n{code:java}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundImage:\"/images/gradient.jpg\"\r\n});\r\n\r\nwin.add(Ti.UI.createImageView({\r\n \timage:\"/images/gradient.jpg\"\r\n}));\r\n\r\nwin.open();\r\n{code}\r\n", "attachment": [ { "id": "61801", "filename": "banding_evidence.jpg", "author": { "name": "c3k", "key": "c3k", "displayName": "carlo", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-03-08T09:42:02.000+0000", "size": 1454285, "mimeType": "image/jpeg" }, { "id": "61795", "filename": "gradient.jpg", "author": { "name": "c3k", "key": "c3k", "displayName": "carlo", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-03-07T17:32:02.000+0000", "size": 24876, "mimeType": "image/jpeg" }, { "id": "62074", "filename": "gradient.png", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-04-20T14:59:45.000+0000", "size": 32589, "mimeType": "image/png" }, { "id": "61804", "filename": "project.zip", "author": { "name": "c3k", "key": "c3k", "displayName": "carlo", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-03-08T12:41:20.000+0000", "size": 737778, "mimeType": "application/zip" }, { "id": "61794", "filename": "Screenshot_20170307-181448.png", "author": { "name": "c3k", "key": "c3k", "displayName": "carlo", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-03-07T17:32:14.000+0000", "size": 316331, "mimeType": "image/png" } ], "flagged": false, "summary": "Android: ImageView quality (gradient banding)", "creator": { "name": "c3k", "key": "c3k", "displayName": "carlo", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "c3k", "key": "c3k", "displayName": "carlo", "active": true, "timeZone": "Europe/Berlin" }, "environment": "Window 7 x64 / OSX 10.12.3 - Titanium SDK from 4.1.1GA to 6.0.2GA - Andorid SDK 23 / 25", "closedSprints": [ { "id": 883, "state": "closed", "name": "2017 Sprint 09 SDK", "startDate": "2017-04-23T21:46:54.309Z", "endDate": "2017-05-07T21:46:00.000Z", "completeDate": "2017-05-08T00:25:44.276Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "409546", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, The issue is not valid. See the guide http://docs.appcelerator.com/platform/latest/#!/guide/Images_and_ImageView_APIs \r\n\r\nFor background image By default, image will be scaled (stretched or squeezed) to fit the dimensions of the component. \r\n\r\nFor Image view, since you have not define the height or width of the image view the the imageView will be the exact pixel size of the image you define. \r\n\r\n", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2017-03-07T18:31:49.000+0000", "updated": "2017-03-07T18:31:49.000+0000" }, { "id": "409661", "author": { "name": "c3k", "key": "c3k", "displayName": "carlo", "active": true, "timeZone": "Europe/Berlin" }, "body": "It's not about size, it's about the quality.\r\nIn the small image you can see circles of different colours instead of a gradient dithering as the background.\r\nWith some kind of images this behaviour results in very ugly photos (attachment added).", "updateAuthor": { "name": "c3k", "key": "c3k", "displayName": "carlo", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-03-07T22:22:09.000+0000", "updated": "2017-03-08T09:05:34.000+0000" }, { "id": "409805", "author": { "name": "c3k", "key": "c3k", "displayName": "carlo", "active": true, "timeZone": "Europe/Berlin" }, "body": "Tried to disable hardware acceleration, no luck.\r\n\r\nAttachment updated.\r\nPlease have a look.", "updateAuthor": { "name": "c3k", "key": "c3k", "displayName": "carlo", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-03-08T09:53:02.000+0000", "updated": "2017-03-08T09:53:02.000+0000" }, { "id": "409816", "author": { "name": "c3k", "key": "c3k", "displayName": "carlo", "active": true, "timeZone": "Europe/Berlin" }, "body": "My guess is that one of those defaults sets the wrong inPreferredConfig (Android use ARGB_8888 for the images):\r\nhttps://github.com/appcelerator/titanium_mobile/search?utf8=%E2%9C%93&q=inPreferredConfig\r\nhttps://developer.android.com/reference/android/graphics/BitmapFactory.Options.html#inPreferredConfig\r\n\r\nMaybe backgroundImage bring view his pixel format and this is why it works?\r\n\r\nUnfortunatly I can't spend more time on this, hope that this help to solve, because at the moment there's no way to put a gradient in a ImageView and display it correctly on Android and this is inexplicable for me...\r\n", "updateAuthor": { "name": "c3k", "key": "c3k", "displayName": "carlo", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-03-08T13:02:58.000+0000", "updated": "2017-03-08T13:02:58.000+0000" }, { "id": "416838", "author": { "name": "kopiro", "key": "kopiro", "displayName": "Flavio De Stefano", "active": true, "timeZone": "Europe/Rome" }, "body": "We tried: https://github.com/caffeinalab/titanium_mobile/commit/c8020471229c00755dd73ce3a7b64852394c36f2\r\nand in our custom build, no more \"funny\" gradients :)\r\n\r\n", "updateAuthor": { "name": "kopiro", "key": "kopiro", "displayName": "Flavio De Stefano", "active": true, "timeZone": "Europe/Rome" }, "created": "2017-04-05T13:29:19.000+0000", "updated": "2017-04-05T13:29:19.000+0000" }, { "id": "417768", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "master: https://github.com/appcelerator/titanium_mobile/pull/8978", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-04-20T15:04:35.000+0000", "updated": "2017-04-20T15:04:35.000+0000" }, { "id": "425904", "author": { "name": "chmiiller", "key": "chmiiller", "displayName": "Carlos Henrique Zinato", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi everyone,\r\ngreat that you found a solution for that! Is there a way to use this \"opts.inPreferredConfig\" without SDK 6.2.0.GA? I'm on 6.0.x now and would need a fix for a imageView.\r\nThanks!", "updateAuthor": { "name": "chmiiller", "key": "chmiiller", "displayName": "Carlos Henrique Zinato", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-08-04T09:34:13.000+0000", "updated": "2017-08-04T09:34:13.000+0000" }, { "id": "427304", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "[~chmiiller] I think the best way would be to maybe try building the SDK locally with the required fix. You should be able to clone the repo, checkout the 6_0_X branch, then edit with the and build, the build produced will basically be identical to 6.0.4 with a version change plus your change.\r\n\r\nCheck out [this|https://github.com/appcelerator/titanium_mobile#building-locally] for some more info on building locally, and I guess either {{#core-contributions}} or {{#helpme}} on tislack for any help\r\n\r\nChanges verified in 6.2.0.v20170825165823 and 7.0.0.v20170825165854. Closing ticket.", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2017-08-28T11:14:58.000+0000", "updated": "2017-08-28T11:14:58.000+0000" }, { "id": "427475", "author": { "name": "chmiiller", "key": "chmiiller", "displayName": "Carlos Henrique Zinato", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Great that this is fixed now! I'm using window.backgroundImage instead of a imageView and that has fixed my problem, but it is good that we can use ImageView now!\r\nThank you so much", "updateAuthor": { "name": "chmiiller", "key": "chmiiller", "displayName": "Carlos Henrique Zinato", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-09-01T08:41:08.000+0000", "updated": "2017-09-01T08:41:08.000+0000" } ], "maxResults": 9, "total": 9, "startAt": 0 } } }