Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-1543] iOS - Support 2x remote images for iPhone 4

GitHub Issuen/a
TypeNew Feature
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:56:28.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.6.0 M04
ComponentsiOS
Labels2x, feature, highres, images, ios, iphone, release-1.6.0, remote, rplist
ReporterRalf Pfeiffer
AssigneeReggie Seagraves
Created2011-04-15T02:55:34.000+0000
Updated2011-04-17T01:56:28.000+0000

Description

You currently support local highres images, but not remote.

Attachments

FileDateSize
screen-shot-2011-01-13-at-94407-am.png2011-04-15T02:55:35.000+000017369
screen-shot-2011-01-13-at-94526-am.png2011-04-15T02:55:35.000+000012294

Comments

  1. Luke Melia 2011-04-15

    Also in helpdesk ticket http://developer.appcelerator.com/helpdesk/view/35771">http://developer.appcelerator.com/helpdesk/view/35771

  2. Seb S. 2011-04-15

    Really need this.
    Many users in QA requesting this, hope you can make a fix in the next coming nightly builds?

  3. Richard Madison 2011-04-15

    Just adding my vote to bump the priority of this.

    We have an app in the Appstore and we're taking quite a bit of heat over the fuzzy resolution for remote images on iPhone 4's. Our app is very similar to the Appstore and remote images make up a very large portion of the user experience --- http://itunes.apple.com/app/freedom-app/id392853455?mt=8">http://itunes.apple.com/app/freedom-app/id392853455?mt=8

    I suspect this is going to skyrocket with the new retina iPod Touches just released.

    Thanks, Richard.

  4. Shannon 2011-04-15

    Another bump. I don't need auto-detection or auto-switching... I just need the option to set scale of UIImageView.

  5. Ralf Pfeiffer 2011-04-15

    We are getting a lot of interest from customers on this. Also PS is voting it up.

    Blain, Steve can one of you look at this for the next milestone?

  6. Stephen Tramer 2011-04-15

    Accidentally committed fix as #1534. See there for details.

    KS Test:

    • Base UI->Views->Hi-Res Image Remote
    • Should display the same image, in same bounds, at same resolution, as Base UI->Views->Hi Res Image 2

    ABOUT REMOTE SUPPORT: We do not support automatic remote detection of 2x images. You are required to check display density (Ti.Platform.displayCaps.density) for a 'high' value to indicate a retina display. You must then also set the 'hires' property on any image view which uses one of these images, otherwise you may see unexpected scaling behavior.

  7. Stephen Tramer 2011-04-15

    Forgot to mark fixed-in-qa in that last one...

  8. Thomas Huelbert 2011-04-15

    [INFO] Titanium SDK version: 1.6.0 (01/12/11 09:38 db09d1e) 4.2.1 4GT and 3.1.3 iphone

  9. Thomas Huelbert 2011-04-15

    3.1.3 did not load as expected.

  10. Shannon 2011-04-15

    The 2x image loaded, but it seems that the image scaling code was not modified to take this into account. 2x images appear visually to be half the size they should be.

    Example:

    I have a 60x60 Ti.UI.ImageView. On a iPhone 3, my remote image loads, and is scaled to fill the 60x60 space.

    However, on an iPhone 4, the high-res image seems to have scaled to only take up half of the space. I believe the image scaled to literally 60x60px, instead of 60x60 points on the screen (aka 120x120px).

    My code:

        

            // left image
            var updateImage = Titanium.UI.createImageView({
                defaultImage:'images/loading_60.png',
                image:thisUpdate.updateCauseIcon,
                top:5,
                left:10,
                width:60,
                height:60
            });
            // iPhone 4 display
            if (Titanium.Platform.displayCaps.dpi == 320) {
                updateImage.image = thisUpdate.updateCauseIcon2x;
                updateImage.hires = true;
            }</code>
        
        
        
        

    First screenshot (timestamp wise) is retina, second is normal. Tested using today's build "r7ca73a34".

  11. MelloMike 2011-04-15

    I can confirm that I'm having the same issue as Shannon. 2x images are showing up half the size of the ImageView's width and height that was given.

  12. Thomas Huelbert 2011-04-15

    shannon and mike does the bug here describe your issue? #2805

  13. MelloMike 2011-04-15

    Hi Thomas, the problem that we're having is when the 'hires' is set to true images are half the size of the ImageView. Just loading a @2x image with hires set to false works just like it did before in 1.5 (at least it does for me)

    So to answer your question, No #2805 doesn't totally describe our issue.

  14. Shannon 2011-04-15

    I concur... local high-res images seem to work fine in 1.6

  15. Thomas Huelbert 2011-04-15

    thanks for the info Mike and Shannon, I've opened #2819 with Shannon's code and notes.

JSON Source