We’ve had a recent issue with some asset images, where the Retina @2x
version was being used on non-Retina devices. The Retina and non-Retina versions of the assets exist. We’ve tracked the problem down to compression, so we’re able avoid it for now, but if anyone has additional insights, I’d love to hear them.
The icons on the left show how they’re rendering inside the running app. The Retina assets are being used on a non-Retina screen, so they’re being scaled down to 50%, which is causing some blurry edges.
The icons on the right are the original assets.
This is only happening to some assets. Most of the app is okay. We’ve been using ImageOptim to compress the PNGs used in the app. ImageOptim is using a variety of compression combinations for the assets. These are the common best results:
PNGOUT
PNGOUT+AdvPNG
PNGOUT+Zopfli
AdvPNG+Zopfli
The assets that have problems all seem to be using PNGOUT+Zopfli
, but not all assets with PNGOUT+Zopfli
are bad. I am not 100% confident with this diagnosis though.
Given that the issue isn’t always easy to spot, and given I don’t know exactly what’s wrong, we’ve unfortunately decided to not compress our new PNGs used in Mac apps. This is a shame, because the space savings are good.
We’ve tried a few different Xcode project settings, including turning Combine High Resolution Artwork
on and off.
I’d like some answers, but I am also posting here so there’s some information that may help others with this issue, even if I only have a partial solution.