{ "id": "116151", "key": "TIMOB-14395", "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": "15699", "description": "2013 Sprint 21", "name": "2013 Sprint 21", "archived": true, "released": true, "releaseDate": "2013-10-18" }, { "id": "15700", "description": "2013 Sprint 21 API", "name": "2013 Sprint 21 API", "archived": true, "released": true, "releaseDate": "2013-10-18" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-10-13T20:45:11.000+0000", "created": "2013-06-19T00:11:29.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [], "issuelinks": [ { "id": "29845", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "115663", "key": "TIMOB-14199", "fields": { "summary": "Android: ImageView scaling not working", "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": "Low", "id": "4" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "42362", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "122356", "key": "TIMOB-15747", "fields": { "summary": "Android: Images do not scale UP properly on Android (parity issue)", "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": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "updated": "2014-10-24T17:01: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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "The following code was used in the documentation for ImageViews for the latest SDK see: [Images and ImageView API's|http://docs.appcelerator.com/titanium/latest/#!/guide/Images_and_ImageView_APIs]\r\n\r\n{code}\r\nvar win1 = Titanium.UI.createWindow({ \r\n backgroundColor:'#fff'\r\n});\r\n\r\nvar imageView = Titanium.UI.createImageView({\r\n\timage:\"/iphone/appicon.png\",\r\n\twidth: 57,\r\n\theight: 100,\r\n\tbackgroundColor: \"red\"\r\n})\r\n\r\nwin1.add(imageView);\r\n\r\nwin1.open();\r\n{code}\r\n\r\nThe code is expected to output a result that looks like this:\r\n\r\n!http://docs.appcelerator.com/titanium/latest/images/download/attachments/29004912/imagescaling.png!\r\n\r\nInstead, it outputs this:\r\n\r\n!SkewedImage.png!", "attachment": [ { "id": "39983", "filename": "NotEnlarged.png", "author": { "name": "bsudbury", "key": "bsudbury", "displayName": "Ben Sudbury", "active": true, "timeZone": "Australia/Sydney" }, "created": "2013-06-19T00:20:50.000+0000", "size": 22734, "mimeType": "image/png" }, { "id": "39982", "filename": "SkewedImage.png", "author": { "name": "bsudbury", "key": "bsudbury", "displayName": "Ben Sudbury", "active": true, "timeZone": "Australia/Sydney" }, "created": "2013-06-19T00:11:29.000+0000", "size": 27563, "mimeType": "image/png" } ], "flagged": false, "summary": "Android: ImageView scaling not consistent with samples in documentation", "creator": { "name": "bsudbury", "key": "bsudbury", "displayName": "Ben Sudbury", "active": true, "timeZone": "Australia/Sydney" }, "subtasks": [], "reporter": { "name": "bsudbury", "key": "bsudbury", "displayName": "Ben Sudbury", "active": true, "timeZone": "Australia/Sydney" }, "environment": "Android 4.1 - Nexus 4\r\nAndroid SDK 22\r\nSDK 3.1.0\r\nSDK 3.1.1", "comment": { "comments": [ { "id": "258484", "author": { "name": "bsudbury", "key": "bsudbury", "displayName": "Ben Sudbury", "active": true, "timeZone": "Australia/Sydney" }, "updateAuthor": { "name": "bsudbury", "key": "bsudbury", "displayName": "Ben Sudbury", "active": true, "timeZone": "Australia/Sydney" }, "created": "2013-06-19T00:12:20.000+0000", "updated": "2013-06-19T00:12:20.000+0000" }, { "id": "258487", "author": { "name": "bsudbury", "key": "bsudbury", "displayName": "Ben Sudbury", "active": true, "timeZone": "Australia/Sydney" }, "body": "A slightly different example but also not scaling as per the documentation.\r\n\r\nIf you change the Width to be larger than the image and the Height to be Ti.UI.SIZE, the image is not scaled up at all.\r\n\r\nSo, the following code:\r\n\r\n{code}\r\nvar win1 = Titanium.UI.createWindow({ \r\n backgroundColor:'#fff'\r\n});\r\n\r\nvar imageView = Titanium.UI.createImageView({\r\n\timage:\"/iphone/appicon.png\",\r\n\twidth: 87,\r\n\theight: Ti.UI.SIZE,\r\n\tbackgroundColor: \"red\"\r\n})\r\n\r\nwin1.add(imageView);\r\n\r\nwin1.open();\r\n{code}\r\n\r\nResults in the following output:\r\n\r\n!NotEnlarged.png!\r\n\r\nNote: That scaling is working perfectly for width equal to or less than true image width and Height = Ti.UI.SIZE", "updateAuthor": { "name": "bsudbury", "key": "bsudbury", "displayName": "Ben Sudbury", "active": true, "timeZone": "Australia/Sydney" }, "created": "2013-06-19T00:20:50.000+0000", "updated": "2013-06-19T00:22:35.000+0000" }, { "id": "259583", "author": { "name": "clathrop", "key": "clathrop", "displayName": "Carter Lathrop", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Thanks Ben, \n\ntested and confirmed on 3.1.1GA & 3.1.0GA, bug occurs on both iOS and Android. Since this ticket has a better test case (as in in classic Titanium) I will move this to engineering and mark other as duplicate. Thanks again for bringing this to our attention. \n\nRegards,\nCarter", "updateAuthor": { "name": "clathrop", "key": "clathrop", "displayName": "Carter Lathrop", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-06-26T19:59:44.000+0000", "updated": "2013-06-26T19:59:44.000+0000" }, { "id": "267696", "author": { "name": "jfalcone", "key": "jfalcone", "displayName": "Joe Falcone", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This is a pretty serious bug for folks displaying images in their apps.\r\nWe've had to resort to showing images in webViews which is a much more costly alternative.\r\nThis is preventing us from migrating to 3.1 for some of our apps.", "updateAuthor": { "name": "jfalcone", "key": "jfalcone", "displayName": "Joe Falcone", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-22T21:13:49.000+0000", "updated": "2013-08-22T21:13:49.000+0000" }, { "id": "267701", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~jfalcone] I've tentatively scheduled this for 3.2.0", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-22T21:21:03.000+0000", "updated": "2013-08-22T21:21:03.000+0000" }, { "id": "273002", "author": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "body": "The test case is working correctly. If both width and height is defined, the image will scale to fill the area without maintaining the aspect ratio. The documentation is not correct.\r\n\r\nThe test case in the comment should make the image scale keeping the aspect ratio intact and keeping the width. \r\nCode change fix this issue\r\n\r\nhttps://github.com/appcelerator/titanium_mobile/pull/4738\r\n", "updateAuthor": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2013-09-26T18:12:35.000+0000", "updated": "2013-09-26T18:12:35.000+0000" }, { "id": "274930", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "CR + FR", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-10-13T20:45:11.000+0000", "updated": "2013-10-13T20:45:11.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }