[TIMOB-1680] iOS regression: ImageView loaded from local file no longer scales in current git build
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T01:56:51.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.5.0 |
Components | iOS |
Labels | imageview, ios, iphone, regression, rescale, scaling, size |
Reporter | Brion Vibber |
Assignee | Nolan Wright |
Created | 2011-04-15T02:59:13.000+0000 |
Updated | 2011-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
File | Date | Size |
---|---|---|
256x256.png | 2011-04-15T02:59:14.000+0000 | 44261 |
screenshots-scaling.png | 2011-04-15T02:59:14.000+0000 | 247253 |
(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...
1.4.2.4c5cd4a ipod 4th gen 4.1