faceless2 / jpeg2000

JPEG2000 support for Java, requiring no external dependencies
Other
11 stars 7 forks source link

Would you accept an ImageIO patch? #5

Closed keinhaar closed 9 months ago

keinhaar commented 10 months ago

I've done an ImageIO Provider to use this lib together with PDFBox. Works very good for me.

If you are interested, i could make a pull request.

faceless2 commented 10 months ago

I dropped all the ImageIO aspects when I forked it because they were unnecessarily complicated, had dependencies and got in the way of using the API via any non-ImageIO method. But there's no reason not to reinstate ImageIO so long as we don't give up any of those wins.

So sure, create a PR and we'll take a look. Thanks!

haraldk commented 10 months ago

Sorry for jumping in on this issue.

Just want to say that a fully functional JPEG 2000 plugin for Java ImageIO would be very much appreciated! 👍🏻

If you don’t think the ImageIO API fits here, I’ll consider adding a dependent module in TwelveMonkeys. 😉

faceless2 commented 10 months ago

Just to underline my original point... the tree I forked from already had ImageIO support and I took it out. It's even got ImageIO in the name! https://github.com/jai-imageio/jai-imageio-jpeg2000

haraldk commented 10 months ago

Thanks, I understand, however, that repo doesn't seem maintained and doesn't work for the sample images I use. Not sure if @keinhaar has come to the same conclusion, but I suspect that is the reason why he suggested the PR.

keinhaar commented 10 months ago

I really like the minimalistic approach (would have done the same). So i've done only the bare minimum of what is needed to read images with ImageIO. No writing support. Just 2 classes and a service provider definition. PULL Request has been initiated.

faceless2 commented 9 months ago

Thanks! That's great. I made a few tweaks, only significant one being that if ImageInputStream is already seekable we don't want to copy it again. It seems to be testing fine here, but please do double check at your end I didn't break anything and let me know.

Appreciate your help.

keinhaar commented 9 months ago

Works for me. Thanks.