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

Add feature to disable image crate's jpeg-rayon for wasm compatibility #156

Open
stanleydesu opened this issue Jan 7, 2022 · 3 comments

Comments

@stanleydesu
Copy link

stanleydesu commented Jan 7, 2022

Loading JPEGs with xobject::image_from in WASM code causes a panic (e.g. image-rs/image#1496), as there isn't multithreading in WASM now and xobject::image_from uses image, which uses rayon for JPEG loading.

Could there be an option in lopdf for disabling image from using rayon (disabling example: image-rs/image#879 (comment)), such as a feature flag?

@stanleydesu stanleydesu changed the title Add feature to disable image's rayon for wasm compatibility Add feature to disable image crate's jpeg-rayon for wasm compatibility Jan 7, 2022
@J-F-Liu
Copy link
Owner

J-F-Liu commented Jan 10, 2022

Yes, PR is welcome

@Heinenen
Copy link
Collaborator

Heinenen commented Aug 4, 2024

According to image-rs/image#703 (comment), this issue should no longer occur.
@stanleydesu, can you confirm that the issue is resolved?
(I can't reproduce the error, but maybe I'm doing something wrong)

@Heinenen
Copy link
Collaborator

Heinenen commented Aug 4, 2024

PS: rayon-rs/rayon#1019 is probably the thing that fixed it.

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

3 participants