Closed siiinc closed 1 year ago
JXLImage
only supports floats. If you have a 16-bit RGB BufferedImage
you can always do something like:
JXLImage jxlImage = decoder.decode();
BufferedImage my16bitImage = foo;
Graphics g = my16BitImage.createGraphics();
g.drawImage(jxlImage.asBufferedImage(), 0, 0, null);
I am not worried about the data type but is there a way to stop data rescaling? The image looks fine when displayed, just the pixel values, which mean something to me, are changed.
i.e., jxl pixels (via libjxl) as [245, 302, 394] becomes jxlatte decompressed [0.000289578107185662, 0.000356883567292243, 0.000465500168502331]
libjxl is using floats and it's just scaling it before giving it to you in an opaque way.
Using com.thebombzen.jxlatte.io.PNGWriter as an example I was able to scale back to 16bit vals.
Is there an option that will enable me to convert a compressed 16bit image (short) back to 16bits and not float?