Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support for png #15

Open
hpvd opened this issue Aug 4, 2021 · 2 comments
Open

support for png #15

hpvd opened this issue Aug 4, 2021 · 2 comments

Comments

@hpvd
Copy link

hpvd commented Aug 4, 2021

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..

@xqms
Copy link
Owner

xqms commented Aug 4, 2021

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.

@hpvd
Copy link
Author

hpvd commented Aug 4, 2021

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/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants