Traneptora / jxlatte

Java JPEG XL decoder
MIT License
45 stars 5 forks source link

Bug in BufferedImage usage #17

Closed hYdos closed 1 year ago

hYdos commented 1 year ago

I'm not even sure how this happened, But your BufferedImage returned from JxlImage managed to crash ComponenetColorModel inside of AWT. image The call stack: image My Code running into the error: image Unfortunately, I cannot provide you with the image this time as its so messed up ImageIO cant find a way to encode the image image "Returns: false if no appropriate writer is found."

hYdos commented 1 year ago

Update: I did more digging and found the jxl file responsible https://cdn.discordapp.com/attachments/1080332031914950716/1097396030779166820/body_a_mtl.jxl

I also left out how I read the JXL files: image

Traneptora commented 1 year ago

If you're going to say "something crashed" then at the very least, provide a stack trace. What else do you expect me to do?

You should not expect ImageIO to be able to write the buffered image to PNG as its data type is DataBuffer.TYPE_FLOAT. You will need to draw it on another BufferedImage that the PNG writer understands. Alternatively, just write a PNG directly with the PNGWriter class provided by jxlatte.

hYdos commented 1 year ago

The png me talking about my ability to find the image for debugging for you. The stack trace is clearly seen and arguably more readable due to the inclusion of local variables in the two images i provided image image

Traneptora commented 1 year ago

That's not a stack trace.

Traneptora commented 1 year ago

Any further bug reports with insufficient information will be closed and locked immediately. Don't waste my time explaining that a picture of a partial stack trace is not helpful. I should not have to explain this.