-
Notifications
You must be signed in to change notification settings - Fork 6
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
great stuff - how about turning it into a ImageIO CoDec? #20
Comments
It's on the list of things to do. Also the file you linked is a writer, not a reader. |
yep, I know. But maybe this could be a far away stretch goal. I assume, that one would also find a reader somewhere in there... |
ok - a crude example implementation is done as a prototype. I can use my branch to load JPEG XL using ImageIO - however, there remains the issue that the BufferedImages created by this library seem to be incompatible with ImageIO image saving routines (compare #22) |
Hi, I'm considering implementing an ImageIO plugin ( I see issue #22 refers to a method Update: I found the code in @elbosso's branch, and was able to adapt it to the current main branch + convert the images to more compatible |
I removed all the BufferedImage and WritableRaster code because |
@Traneptora Thanks! After looking some more at the code and testing with various sample images, I can only say, this is seriously impressive stuff! 🤩 I completely understand why you want to keep any AWT dependencies out of the project, keeping it like this makes things more flexible. 👍🏻 I've made an adapter class that can convert to I have loads of questions though, but I might open another issue for that. 😀 |
It's recommended to not use |
I am glad I could be of some (little) help and looking forward to the final result! |
I'm not sure if I understand what you mean? Do you mean that it would not write PNG files from the
Excellent, that is actually what I needed! I had some issue with the images coming out way too "warn". Now, after doing the same transform as you do in your PNGWriter the images look just the same (I haven't compared pixel values directly, but they look equal). samples/bbb.jxl transcoded to PNG using JXLatte samples/bbb.jxl transcoded to PNG using my preliminary code and PS: Is there any way to access the header information of the file, without having to read the entire file? I will need this for an efficient ImageIO plugin (ie. width, height, number of channels, ICC profile if any and other meta data). If not I will try to create a PR with such a method... 😀 |
Currently there is not. It is something I could do, but I haven't added it yet. |
The Reason for this would be that then any Java app loading an image resource could use JPEG XLs without changing its code - the only thing needed would be to put one more jar into the classpath...
I would be willing to participate in the effort as i wrote a few ImageIO codecs already - though not as complex ones as would be needed here...
One could maybe get inspiration for example from here: https://xmlgraphics.apache.org/batik/javadoc/org/apache/batik/ext/awt/image/codec/imageio/ImageIOJPEGImageWriter.html
The text was updated successfully, but these errors were encountered: