Why do people use @2x?

Discussion in 'iOS Programming' started by ArtOfWarfare, Jul 1, 2011.

  1. ArtOfWarfare macrumors 604

    ArtOfWarfare

    Joined:
    Nov 26, 2007
    #1
    I simply drew every image at the highest quality it would ever be seen at and then added it with code that looked something like:

    Code:
    UIImage *lifeImage = [UIImage imageNamed:@"life"];
    UIImageView *lifeView = [[UIImageView alloc] initWithImage:lifeImage];
    [lifeView setFrame:CGRectMake(workView.frame.size.width*[livesView.subviews count]/16.0,
                                  0,
                                  workView.frame.size.width/16.0,
                                  workView.frame.size.width/16.0)];
    [livesView addSubview:lifeView];
    Looking at my images, I see nothing wrong with them quality wise. I don't understand why everyone else uses @2x... it seems to me all that does is make your app bundle bigger without adding anything of value to it.

    (If you're looking at my screenshots on iTunes and saying they're low quality, that's a mistake on my part... I accidentally took them while running the simulator in non-retina rather than retina, and didn't realize my mistake until after submitting to Apple.)
     
  2. admanimal macrumors 68040

    Joined:
    Apr 22, 2005
    #2
    Because a lot of artwork doesn't look right if it is just scaled down, especially detailed icons and things like that.
     
  3. ArtOfWarfare thread starter macrumors 604

    ArtOfWarfare

    Joined:
    Nov 26, 2007
    #3
    Interesting point. I hadn't considered that just like small images scaled up look bad, so too do large images scaled down look bad.

    Now that I am thinking about it, that explains why my border that is 1 pixel thick at full quality looks lousy on a non-retina screen.

    Would moving entirely to vector based images solve the problem, do you think? (Given all my images for my game are composed of shapes with different gradient fills and strokes, I could easily transition... except I don't think the iPhone really supports anything like .svg or other vector file formats...)
     
  4. admanimal macrumors 68040

    Joined:
    Apr 22, 2005
    #4
    It would solve the problem in the sense that it would make it easier for you to create two versions of the artwork.
     

Share This Page