Optimise graphics (PNG+PDF) with zopflipng and ghostscript#5529
Conversation
|
This seems to contain the PNG optimisations from the pull request 5527 as well, so I closed that one. |
|
Since these files are generated using a separate program, and since Ghostscript-generated PDFs are not always the nicest, I hesitate to accept this pull request. Will investigate incorporating zopflipng (or something like it) into the PNG generation toolchain, but Ghostscript is a non-starter for this. |
|
I understand your hesitation regarding the use of ghostscript. It sometimes make ugly pdfs. I used this command: It'd obviously be fantastic if you incorporated optimisations in your toolchain itself. If that happens I definitely wouldn't mind this PR be rejected. Zopflipng seems like the best but also the slowest. But since the PNGs seem to be changed very rarely, this shouldn't be much of an issue. |
|
OK, I've done a bunch of testing and am happy with the results. Changes are getting pushed now... |
|
OK, changes are now merged. |
Shaved 1.8MiB off the pdf files test/*.pdf.