For iOS apps, xcode optimizes PNG files so that image preview cannot be displayed. So how can we view these optimized files?
The optimization is completed by the pngcrush tool. You can find it in xcode. Pngcrush supports command line options-revert-iphone-optimizations.
This option can be used to cancel the optimization during xcode compilation. Therefore, to view the optimized file, you should first cancel the optimization and use the image preview to open it.
Token)
$/Applications/Xcode. app/Contents/Developer
/Platforms/iPhoneOS. platform/Developer/usr/bin/pngcrush
-Revert-iphone-optimizations-q Local.png Local-standard.png
If xcode is not installed in a standard location, you can use xcode-select to find the location of the tool:
$ "'Xcode-select-print-path '"
/Platforms/iPhoneOS. platform/Developer/usr/bin/pngcrush
-Revert-iphone-optimizations-q Local.png Local-standard.png