Oh, but what are you saying @JSWolf? In the 2000s, this type of website was the pinnacle of quality and innovation, you millennial with no taste for beauty.
(OK, I'll close the subject right now: I was born in 1994, the first site I saw was in 2008 and it was already much better. Just, the joke was too easy to not do it.)
---
Quote:
Originally Posted by kovidgoyal
Its best claimed improvement is 10% over optipng for some images.
|
Hmm, according to some initial tests I did, it was more than that. 10% was the final file size... but these were ultra-specific cases, so the result will probably be different on calibre images.
*
testing done, that was fun*
*
Hmm, I've had some interesting results*
Preamble:
I didn't know too deep into how they work, but from what little I understood:
OptiPNG works on reducing the redundancy of certain data within the PNG file, without touching its content too deeply.
PNGout, if it does that too, has a deeper analysis capacity and can decide to completely rewrite the file, using the "color palettes" mode if possible. And in those moments, it becomes truly monstrous efficiency.
(And no idea how ImgBot works)
Parameter used:
OptiPNG -o7 <file>
PNGout <file> /s0
Result:
Note: I ran the test with d28319b1 as the parent commit, before the last ImgBot run, to get the cleanest comparison with ImgBot (the results will therefore be significantly different from the current commit)
You can download the test results in the attached ZIP file. The '--filtred' txt only contains files that have also been processed by ImgBot for easier file-to-file comparison.
OptiPNG, on the whole, only managed to save around ten bytes on average, with the occasional hundred or so on the lucky few. Nevertheless, when compared with ImgBot, it's surprising: ImgBot modified 37 PNGs (16027 bytes saved) and OptiPNG 52 (6998 bytes saved) BUT, there are only 2 files in common, and in both cases OptiPNG performed significantly better by ~100b.
The result was a mixed bag, with the two software appearing to have different strategies that don't overlap.
PNGout was clearly more efficient for him, modifying 730 files, which leads to a result 124896 bytes saved, which is ~100Kb more than ImgBot. With each file in common, PNGout outperforms by ~100b or more. However, most of the results are on older files, which ImgBot processed a long time ago but hasn't touched since. The improvements are in the same order of magnitude, 10b to 100b and somtime more, but there are
many. With some surprising ones like 'recipes/icons/thenewcriterion.png': last optimized by ImgBot 11 months ago and was ignored by 5 other passages; PNGout? 1531b -> 120b.
There are only 2 images that PNGout didn't handle compared to ImgBot

... for a reduction of ~40b each. More than negligible view the size saved elsewhere.
Note that in some very minor cases, PNGout performs less well than OptiPNG (but still better than ImgBot).
And this if you use PNGout alone. If you make a second pass behind with OptiPNG, you gain even more for a total of 133745 bytes saved (+10Kb that only PNGout)
> A make a
pull request with this, but with the most recent commit.
Conclusion:
PNGout is clearly much more powerful than OptiPNG, well over the 10% announced above.
And, if you use the right tools in the right order (PNGout+OptiPNG), you can get a better results than ImgBot (2%). Thin, but sensitive when you consider that most of the images are already optimized by ImgBot which is already very efficient.
So, I don't know whether to include it in the calibre workflow, nevertheless, I think it's a nice solution to know about.
But beyond the image optimization of the calibre software itself, PNGout could be a welcome addition to the image optimization toolbox of ebooks, because right now I think caliber only implements OptiPNG, but PNGout is much more powerful.
But detail. The information is transmitted.