0

Silly question. But regarding images for iOS, I keep seeing the @2x identifier. Does that just mean the image is twice the size and therefore clearer as opposed to "@1x" image with the same dimensions? Or does the @2x actually mean something when compiling. What's the drawback to just using larger images and scaling them down inside xcode?

Clearly I don't understand something.

JoshDG
  • 3,871
  • 10
  • 51
  • 85

1 Answers1

0

@2x is just the convention Apple chose for what image to use on a retina device vs a non-retina one—it has no meaning for compilation.

Using larger images and scaling them down doesn't look as good as using 1x images (you can try it yourself). Sometimes a designer might also e.g. remove details from a 1x image because at the lower resolution you can't make them out. Some things also don't scale down well, such as 1px lines. Scaling down images also adds overhead in I/O (opening a larger file) and at runtime (scaling algorithm).

Technically the @2x doesn't even need to be double the size of the 1x, though it's rare that you wouldn't want to do that (in one case for me, I was using resizable images and it was more convenient to have their cap-insets be exactly double even if the images themselves weren't).

MaxGabriel
  • 7,617
  • 4
  • 35
  • 82
  • To add to this, there's Apple's [Points vs Pixels](https://developer.apple.com/library/ios/documentation/2DDrawing/Conceptual/DrawingPrintingiOS/GraphicsDrawingOverview/GraphicsDrawingOverview.html#//apple_ref/doc/uid/TP40010156-CH14-SW7) documentation. – bneely Sep 26 '13 at 04:05
  • Perfect thanks for explaining and thanks to @UFO for that link. Just couldn't find the apple doc! – JoshDG Sep 26 '13 at 04:11