![]() ![]() So far, we’ve opted to not use this technique for iStat Menus, but if you’re looking to shave a little more off your final app size, it’s good. For icons that don’t contain gradients, the results will likely be even better. I think it’d be very difficult to spot the difference in the Finder. The comparison below shows the most obvious differences in our icon, zoomed really far in. The 1024×1024 app icon asset is almost always shown scaled down, so the quantisation of converting to an indexed PNG is partially undone, because the scaled icon averages out the errors. If you’re going to do it, I’d recommend 256 colours, and you may as well use the best quality, because it’s a quick process. It’s a lossy technique, but depending on the source image, it can look good and be far smaller. Pngquant converts PNGs to indexed colour images, while maintaining alpha transparency. With that in mind, lossy compressing just the 1024×1024 icon using pngquant seems like an acceptable trade-off in quality. The icon view only shows an unscaled asset with a size of 512pt, and the column info pane’s icon is always scaled down. The 1024×1024 app icon asset is only used in two places - the Finder when using icon view with a size over 264pt, and in the Finder’s column view info pane. Everything matches what you’d expect, and Launchpad uses the correct, non-Retina asset.Īll the icon assets are used somewhere, and omitting sizes doesn’t seem wise. The same tests were run on a non-Retina display by Kit Grose (thanks!). The dock and Finder column view info pane display sizes in pixels are approximates, but should be pretty close to the actual sizes. Launchpad uses the 256px 1× non-Retina asset, even on a Retina display. To test, I created an app icon that shows a different colour for each asset size, with a white sash added for the non-Retina versions.įor the dock, the 128pt 2× (256px) asset is always used, no matter how big or small the dock is, and even when magnified. The goal was to identify if we could remove certain icon sizes, or intentionally degrade specific sizes via lossy compression. ![]() It’s currently about 1.22MB, which is normal for an app icon, but a decent percentage of our bundle.Īs part of the research, I tested which assets are used across the various places icons are shown in macOS. ![]() In an effort to reduce the final app size of iStat Menus, we’ve been investigating ways to slim down our app icon. ![]()
0 Comments
Leave a Reply. |