Highlight Non-Retina Image Assets in Red to Insure High Resolution Images Load
For the developers and UI designers out there, Apple’s developer docs show us how to highlight non-retina images in red, making it easy to determine if the 2x image assets are loading properly for retina displays. You can set the image tinting to occur in all apps, or on a per-app basis.
Enable Non-Retina Image Highlighting for All Apps
This defaults command impacts all applications:
defaults write -g CGContextHighlight2xScaledImages YES
Restrict 2x Image Tinting to a Single Application
Use the following defaults command to restrict to the specific app, changing com.mycompany.myapp to your app:
defaults write com.mycompany.myapp CGContextHighlight2xScaledImages YES
Larger elements look like the image above, and smaller images are highlighted as the image below demonstrates:
Apple recommends using this in combination with HIDPI mode, assuming you have a display which supports it of course.
This tip is probably only useful for developers and UI designers, but if you fall into that boat and you’re in the midst of updating apps for high-res @2x support you’ll certainly appreciate it. For everyone else, this could be viewed as an indicator that the entire Mac lineup will eventually feature retina displays. In many ways the release of the Retina MacBook Pro could just be an initial staging ground for devs and designers to update their apps before a wider rollout of retina displays comes across the Mac platform.
Thanks to everyone who sent this in.