Skip to content
Discussion options

You must be logged in to vote

Thanks for the tips . Here is what i come up with now: https://github.com/HinTak/pymupdf-jbig2-extract/blob/main/lossy-convert.py

It is mostly doing want I wanted - just convert RGB flatedecoded images to jpeg. I have two questions though:

  • going via PIL.Image.save vs fitz.Pixmap.save results in much better compression, by default even without the optimized=True PIL key (you can roll back a commit or two before to see the diff - I started off with PIL actually, then wanted to remove that dependency and found the size result to be worse - the public repo has simplified/reverted history compared to my private repo). In one file I use for such test, original is 400MB. Going via PIL gives a …

Replies: 6 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by HinTak
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants