{ "id": "62312", "key": "TIMOB-1680", "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": "11225", "name": "Release 1.5.0", "archived": true, "released": true, "releaseDate": "2010-12-14" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:56:51.000+0000", "created": "2011-04-15T02:59:13.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "imageview", "ios", "iphone", "regression", "rescale", "scaling", "size" ], "versions": [], "issuelinks": [], "assignee": { "name": "nwright", "key": "nwright", "displayName": "Nolan Wright", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T01:56:51.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": "{html}

In StatusNet Mobile, we're saving avatar and site icon images\nfrom the network to local filesystem storage. Within the webview\nwhere we show some content everything's fine, but images that we\nload directly into ImageViews are no longer scaled to the size of\nthe ImageView on iPhone in current builds from git.

\n

Example (use any 256x256 PNG file):

\n
\nvar window = Ti.UI.createWindow({\n    backgroundColor: 'black'\n});\n\nvar img = Ti.UI.createImageView({\n    image: '256x256.png',\n    width: 128,\n    height: 128,\n    canScale: true, // only used by Android\n    enableZoomControls: false // only used by Android\n});\nwindow.add(img);\nwindow.open();\n
\n

Expected behavior: image should be scaled to 128x128 in logical\ncoordinates

\n

Actual behavior on Android: as expected

\n

Actual behavior on iPhone w/ 1.3.2: as expected

\n

Actual behavior on iPhone w/ 1.4.0: as expected

\n

Actual behavior on iPhone w/ current git build: image shows at\nits original size in logical coordinates (256x256).

\n

Screenshot showing the above attached.

\n

Images loaded directly from a remote URL are still scaled to the\ncorrect logical display size.

\n

This bug put a halt to today's beta push for StatusNet Mobile; I\ncan work around it by disabling our filesystem caching on iPhone\nfor the affected parts, but this will leave us unable to show\ncached icons when offline. Assigning to our support contact.

{html}", "attachment": [ { "id": "18041", "filename": "256x256.png", "author": { "name": "brionvibber", "key": "brionvibber", "displayName": "Brion Vibber", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:59:14.000+0000", "size": 44261, "mimeType": "image/png" }, { "id": "18040", "filename": "screenshots-scaling.png", "author": { "name": "brionvibber", "key": "brionvibber", "displayName": "Brion Vibber", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:59:14.000+0000", "size": 247253, "mimeType": "image/png" } ], "flagged": false, "summary": "iOS regression: ImageView loaded from local file no longer scales in current git build", "creator": { "name": "brionvibber", "key": "brionvibber", "displayName": "Brion Vibber", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "brionvibber", "key": "brionvibber", "displayName": "Brion Vibber", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "126353", "author": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "body": "{html}

(from [87903b26cc1d6e3f07459b754d73caa8579fd268])\n[#1867 state:fixed-in-qa] [#1583\nstate:fixed-in-qa] [#1740 state:fixed-in-qa] [#1680\nstate:fixed-in-qa] [#1676 state:fixed-in-qa] [#1584\nstate:fixed-in-qa] Image views use content mode aspect fit scaling\ninstead of centering. This may also solve things for #1543, but\nnot sure. \nhttp://github.com/appcelerator/titanium_mobile/commit/87903b26cc1d6...

{html}", "updateAuthor": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:59:15.000+0000", "updated": "2011-04-15T02:59:15.000+0000" }, { "id": "126354", "author": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

1.4.2.4c5cd4a ipod 4th gen 4.1

{html}", "updateAuthor": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:59:15.000+0000", "updated": "2011-04-15T02:59:15.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }