4 ms·
Since it's mentioned in the article: Does anyone have experience with lossy png tools? I'm currently working on a project that needs alpha channels. I've been
by CookWithMe 12y ago
Since it's mentioned in the article: Does anyone have experience with lossy png tools?
I'm currently working on a project that needs alpha channels. I've been optimizing the images with pngcrush, which helped (interestingly, images put out with Adobe products where already pretty optimized, but I'm generating thumbnails locally with sips, where pngcrush often saves 60+%).
Still, for photographic images, file size often remains multiple times larger than what I'd expect from a high-quality JPEG.
- Daiz 12y ago>Does anyone have experience with lossy png tools? I do. Lossy PNGs work great for images with not a lot of colors. I use pngquant and optipng a lot in my work to compress a lot of PNG images with practically no visual quality loss. For very colorful images, lossy (quantized & dithered) PNGs just don't work, though. They just end up looking nasty with larger filesizes than what high quality JPG gives you.
- pornel 12y agoThere's also a method for true-color lossy PNGs that blurs instead of dithering: https://speakerdeck.com/pornel/lossy-png-for-true-color-images-velocity-conf-eu-2014 https://speakerdeck.com/pornel/lossy-png-for-true-color-imag... (https://github.com/pornel/mediancut-posterizer https://github.com/pornel/mediancut-posterizer). It's not as efficient as PNG8, but still better than nothing :)
- nailer 12y agoDitto what Diaz said. The author of this article BTW also makes some rad lossy PNG tools. I took a 3MB website down to under 1MB recently, the majority of which were screenshots.
- tracker1 12y agoI use optipng and pngquant together myself... it's been a while since I've looked though... here's the contents of my "!Drag PNG here to Optimize (pngquant and optipng as png8).bat" file ... should be able to do similar in bash/zsh script. @echo off set batchdir=%~d0%~p0 :start "%batchdir%pngquant.exe" --ext .q.png --force --verbose 256 %1 "%batchdir%optipng.exe" -force -o4 -out "%~dpn1.opt.png" "%~dpn1.q.png" del "%~dpn1.q.png" shift if NOT x%1==x goto start rem pause