Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-1680] iOS regression: ImageView loaded from local file no longer scales in current git build

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:56:51.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.5.0
ComponentsiOS
Labelsimageview, ios, iphone, regression, rescale, scaling, size
ReporterBrion Vibber
AssigneeNolan Wright
Created2011-04-15T02:59:13.000+0000
Updated2011-04-17T01:56:51.000+0000

Description

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

Example (use any 256x256 PNG file):

var window = Ti.UI.createWindow({
    backgroundColor: 'black'
});

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

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

Actual behavior on Android: as expected

Actual behavior on iPhone w/ 1.3.2: as expected

Actual behavior on iPhone w/ 1.4.0: as expected

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

Screenshot showing the above attached.

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

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

Attachments

FileDateSize
256x256.png2011-04-15T02:59:14.000+000044261
screenshots-scaling.png2011-04-15T02:59:14.000+0000247253

Comments

  1. Jeff Haynie 2011-04-15

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

  2. Thomas Huelbert 2011-04-15

    1.4.2.4c5cd4a ipod 4th gen 4.1

JSON Source