Jump to content

Command Crate ¿about?

Optimize PNG images recursively (pngcrush)

find . -name "*.[Pp][Nn][Gg]" -printf '  pngcrush  > %p\n' -exec pngcrush -ow -rem alla -reduce -brute -q -warn {} \;

This command searches for PNG files (*.png or *.PNG) in the current directory and subdirectories, and applies lossless compression using pngcrush with options to remove unnecessary chunks (-rem alla), optimize file size (-reduce), and apply brute-force optimization (-brute). The -ow option overwrites the original files, while -q suppresses unnecessary output, and -warn shows warnings if any issues arise during the process.

multimedia [kb:70]