Highlight Non-Retina Image Assets in Red to Insure High Resolution Images Load

Jun 26, 2012 - 2 Comments

Highlight and tint non-retina images in red

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:

Highlight non-retina assets to see images that aren't 2x

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.

.

Related articles:

Posted by: Paul Horowitz in Development, Mac OS, Tips & Tricks

2 Comments

» Comments RSS Feed

  1. toto says:

    This looks obviously exagerated like these stupid before-after ads

  2. Timothy says:

    Good article, thanks.

    “Insure” in your headline, however, should instead be “Ensure.”

Leave a Reply

 

Shop on Amazon.com and help support OSXDaily!

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates

Tips & Tricks

News

iPhone / iPad

Mac

Troubleshooting

Shop on Amazon to help support this site