3 ms·
I wonder how `pngcrush` compares to `oxipng` (https://github.com/shssoichiro/oxipng https://github.com/shssoichiro/oxipng). Personally, I use `oxipng` if I wan
by asicsp 4y ago
I wonder how `pngcrush` compares to `oxipng` (https://github.com/shssoichiro/oxipng https://github.com/shssoichiro/oxipng).
Personally, I use `oxipng` if I want lossless compression. However, most of the time I use `pngquant` instead, since it gives significant size reduction even at `99%` (I can't even distinguish between the original and reduced image).
pngquant --quality=99 --ext=.png --force file.png
- csnover 4y agoIt seems to depend somewhat on the input image. Software like ImageOptim[0] brute force the best compression by trying multiple different compressors/modes and picking the best result and there is rarely a consistent winner. That said, the best solution today is probably to just use a newer image format like WebP or (soon) AVIF if you need to meaningfully reduce image sizes. [0] https://imageoptim.com/versions.html https://imageoptim.com/versions.html
- wolf550e 4y agoJPEG XL beats AVIF, in many cases. See for example: https://twitter.com/jonsneyers/status/1563442356493230080 https://twitter.com/jonsneyers/status/1563442356493230080
- aendruk 4y agoEagerly awaiting https://caniuse.com/jpegxl https://caniuse.com/jpegxl
- account42 4y agocjxl also has a near perceptually lossless mode (-d 1) that actually works and unlike cwebp it does not ignore color space chunks when converting from PNG so the result really does look the same. But browser support is still disabled by default and AFAIK is still missing support for animations for both Chrome and Firefox. This was/is a problem with webp where aninated support came later without any new mime type so you can't fall back to gif / apng if it is not supported using <picture> - hopefully this will be handled better with jxl.
- thrdbndndn 4y agoIt can gives significant reduction sometimes because sometimes the input is "uncompressed" (which png supports), basically just like bmp. In general, I don't find optimizing png beyond the default compression level worth it for typical personal use. But can see why they are useful if you're hosting things.
- asicsp 4y agoYeah, I'm using the lossy compression for blog posts. And, I was comparing `pngquant` to `oxipng` sizes (not the default png output I get after creating a poster). For example, 70KB with oxipng changes to 32KB with pngquant at 99% quality level. This depends on the image of course, but most of the time I do see significant savings.
- aendruk 4y agoYou’ll want to add ECT to the comparison. https://github.com/fhanau/Efficient-Compression-Tool https://github.com/fhanau/Efficient-Compression-Tool