On OS X if the name of two images is foo.png and foo@2x.png then the correct one can be selected by the OS without you doing anything. You literally just say “get me the image named foo”
This is one thing we need to do to the framework to enable retina in end user projects.
NSImage on OS X will do this automatically
iOS is similar