{ "id": "174257", "key": "TIMOB-27471", "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": "2019-12-03T23:52:53.000+0000", "created": "2019-10-15T11:19:24.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [], "versions": [], "issuelinks": [ { "id": "57861", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "outwardIssue": { "id": "166770", "key": "TIMOB-24528", "fields": { "summary": "Android: Fails to load images that exceed GPU max texture size", "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": "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": "2019-12-03T23:52:53.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": "The customer has a requirement where they need to get image and display it in the image view. Few images are not displayed even though images are bind to the image view.\r\n\r\n*It is throwing warning “[WARN] : OpenGLRenderer: Bitmap too large to be uploaded into a texture (4196x3363, max=4096x4096)”.*\r\n I\r\n\r\n{panel}\r\nThis issue is happening because of size 4196x3363, max=4096x4096. The log mentions the max size max=4096x4096. Is there any solution or workaround for this issue?\r\nNote : This issue is on Nexus 7(OS 6.0.1) and Samsung s4(OS 4.4) devices. It is working fine on Pixel(9.0) device. Tested with 8.0.2.GA Ti SDK and 8.2.0.GA Ti SDK.\r\n\r\n{panel}\r\n\r\n\r\nSample Test Code:\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor : '#fff'\r\n});\r\n\r\nwin.add(Ti.UI.createImageView({\r\n\timage : Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, 'test.png'),\r\n\twidth : Ti.UI.SIZE,\r\n\theight : Ti.UI.SIZE,\r\n\tborderColor : 'red'\r\n\t\r\n}));\r\n\r\nwin.open();\r\n{code}\r\n*Steps to reproduce:*\r\n1. Create a sample classic project\r\n2. Replace the app.js with attached app.js content.\r\n3. Place the attached test.png under “Resources” folder.\r\n4. Run the app in Nexus 7 device.\r\n\r\n*Expected*: Image should bee rendered properly.\r\n*Actual:* Image not rendered and throwing warning in the console.\r\n\r\n*Note:*\r\nWe tested it and able to reproduce with the big image as like the customer image on HTC M8 eye v6.0.1\r\n\r\n\r\n", "attachment": [ { "id": "67065", "filename": "imgsample_log.rtf", "author": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2019-10-15T11:19:12.000+0000", "size": 33407, "mimeType": "text/rtf" }, { "id": "67067", "filename": "support_consoleLog.txt", "author": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2019-10-15T11:24:55.000+0000", "size": 65855, "mimeType": "text/plain" }, { "id": "67066", "filename": "test.png", "author": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2019-10-15T11:18:14.000+0000", "size": 230106, "mimeType": "image/png" } ], "flagged": false, "summary": "Android: Unable to load large image to image view", "creator": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "452072", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "The GPUs on devices have a limitation on texture size, this is more apparent on older devices. This is not a Titanium issue, but device specific. However, you should be able to mitigate this issue by resizing your images.\r\n\r\n{code:js}\r\nconst win = Ti.UI.createWindow({ backgroundColor : 'white' });\r\n\r\nconst image = Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, 'test.png').read();\r\nconst scale = 4096/Math.max(image.width, image.height);\r\nconst imageResized = image.imageAsResized(image.width * scale, image.height * scale);\r\n\r\nconst imageView = Ti.UI.createImageView({\r\n\timage: imageResized,\r\n\twidth: Ti.UI.SIZE,\r\n\theight: Ti.UI.SIZE,\r\n\tborderColor : 'red'\r\n});\r\n\r\nwin.add(imageView);\r\nwin.open();\r\n{code}", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-10-15T18:11:38.000+0000", "updated": "2019-10-15T21:10:52.000+0000" }, { "id": "452073", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-10-15T18:17:02.000+0000", "updated": "2019-10-15T18:17:02.000+0000" }, { "id": "453015", "author": { "name": "ahutton", "key": "ahutton", "displayName": "Alan Hutton", "active": true, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "ahutton", "key": "ahutton", "displayName": "Alan Hutton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-12-03T23:52:53.000+0000", "updated": "2019-12-03T23:52:53.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }