Skip to content

JBIG2 image decoder does not work at all #13367

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

Closed
photopea opened this issue May 12, 2021 · 2 comments · Fixed by #13368
Closed

JBIG2 image decoder does not work at all #13367

photopea opened this issue May 12, 2021 · 2 comments · Fixed by #13368
Labels

Comments

@photopea
Copy link

I am using JPG, JPX and JBIG2 decoders from here: https://github.com/mozilla/pdfjs-dist/tree/master/image_decoders

The JBIG2 decoder does not work at all. I think it is because of the typo that you made: you wrote "Jbig2mage" instead of "Jbig2Image".

https://github.com/mozilla/pdfjs-dist/blob/master/image_decoders/pdf.image_decoders.js#L8603

I found a demo here: https://github.com/mozilla/pdf.js/tree/master/examples/image_decoders , but it parses only a JPG image. Could you add a demo code for parsing JBIG2 and JPX?

@timvandermeij
Copy link
Contributor

You're right. Fixed by the PR above. Thank you for reporting this!

@photopea
Copy link
Author

Thanks a lot for fixing it! BTW. I could not parse these images correctly. The JBig2 returns a wrong output (all pixels white), while the JPX throws an error. Could you add these to the demo?

images.zip

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