Support for RGB + extra channels for JXL encoding
j99ca opened this issue · comments
I see that the JXL implementation only can encode extra channels when using grayscale/planar. I have scientific data that I want to encode into JXL that includes RGB, thermal and depth data.
Also, is there any way to specify a palette when using grayscale images when using JXL? I.e. I have 16 bit data that I would like to specify the palette that maps each of the 2^16 values to specific RGB values when using palettes? I see the JPEG XL spec allows for the usage of palettes but no size restrictions (PNG palette indexing is limited to 8 bit). Is there a way to achieve this?
Thanks for the good work!
Neither RGB + extra channels nor indexed images are currently supported by this library. At the time this codec was implemented planar gray + extra channels was the only mode feasible with libjxl. Although it would be nice to support these modes, they are somewhat out of the scope of this library.
Have you tried the JPEGXL driver for GDAL? I think GDAL recently added support for extra channels. Is there any software yet that does support these modes?