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

JP2 image support #1508

Closed
tafel opened this issue Mar 25, 2024 · 3 comments
Closed

JP2 image support #1508

tafel opened this issue Mar 25, 2024 · 3 comments

Comments

@tafel
Copy link

tafel commented Mar 25, 2024

Feature Request

Add JP2 image support

Feature description

Just like #1497, it should be great if PDFKit could understand, parse and display JP2 image.

I use Sharp lib for managing image resize, and it can cope with all these kind of extensions.

Do you plan to add these in a near future?
Thanks

@blikblum
Copy link
Member

PDF does not support this image type. Even png is not supported directly. See https://pspdfkit.com/blog/2018/understanding-images-in-pdf/

Is necessary to convert the image to one of the supported images by pdfkit, before including in a document.

Adding the image conversion in pdfkit is not feasible

@tafel
Copy link
Author

tafel commented Mar 26, 2024

Thanks for your interesting link. I didn't know PDF was so specific with images.

But as a side note, he speaks of JP2 in his article here https://pspdfkit.com/blog/2018/understanding-images-in-pdf/#jpeg-2000 , so it is maybe possible to include it.

@blikblum
Copy link
Member

Yes its possible but undoable, would increase the bundle size a lot since it would require a dependency on a library that does the conversion.

What we can do is implement some way to implement image format through other packages, it can be a plugin system or some kind of image / resource container

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