Open hpvd opened 2 years ago
Thanks for the nice feedback!
If I understand correctly, you are suggesting to use additional tools as preprocessing steps before compiling the PDF file that is then placed in the cache (and optionally post-processed with ghostscript). I guess that's a really nice idea. We will have to think about a way to do that that is both flexible and portable.
yes, this is the idea :-)
regarding "external tools" there are really nice once, like the 2 mentioned above for png or mozjpeg for jpeg https://github.com/mozilla/mozjpeg
To have an easy impression what are the problems with jpgs and what is possible with this tool, have a look at this old example https://calendar.perfplanet.com/2014/mozjpeg-3-0/
awesome - just don't know what I like more: time saving when building document or size reduction of final pdf :D
what do you think of giving these possibilities also to png files? There are several uses cases where this filetype is "the better choice" Of course speed and size is a problem here ...
one interesting tool to work on this could be Oxipng Oxipng is a multithreaded lossless PNG compression optimizer (rewrite of optipng) https://github.com/shssoichiro/oxipng
or to save even more bytes and go with lossy compression png quant is pretty perfect (especially when pngs contains transparent backgrounds) https://pngquant.org/
going the extra mile: first step use pngquant and after that use oxipng..