Thumbnail images to scale?

Discussion in 'iOS Programming' started by dantastic, Jul 2, 2011.

  1. dantastic macrumors 6502

    dantastic

    Joined:
    Jan 21, 2011
    #1
    I'm making an image gallery view and for each image I create & store a thumbnail of the full size image. I'm making a thumbnail 100x100.

    How does this work for the retina display? should I test when creating my thumbnail if the phone has a retina display and save a 200x200 thumbnail or what's the best approach here? If it has retina display save the thumb with a myThumb@2x.png ?

    The UIImageViews I roll out in the code are obviously 100x100
     
  2. Shawnpk macrumors 6502

    Joined:
    Jan 13, 2011
    Location:
    Los Angeles, CA
    #2
    Anything with an @2x extension should automatically be used by the retina display. It would probably be better to use this method.
     
  3. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #3
    Yes, your thumbnails should be twice the dimensions for retina display. You can easily check this in the Sim if you don't have a retina display image. Just load it up in the Retina Sim.

    Using @2x probably doesn't do anything for you in this case. Its purpose is to allow your code to use one file name and allow the OS to choose between two files with almost the same name when loading the file. In your case you only have one thumbnail file. Its size will differ between the two displays but that doesn't matter. If you were providing static thumbnails where both would be present in the app you would use @2x.
     

Share This Page