Closed Waterpicker closed 1 month ago
Why not just do ((DataBufferFloat)JXLImage.asBufferedImage().getData().getDataBuffer()).getBankData()
? OpenGL supports float as a data type.
@Traneptora I would also appreciate a method that just gives me a RGB or ARGB buffer either as int or bytes. Its just more useful for various image processing things that are downstream. In op's case opengl. (I do belive that opengl supports float color models but stuff that I need/have doesn't)
It Doesn't have to be a nio Byte/IntBuffer, for me a BufferedImage with one of those types: INT_ARGB/INT_RGB/TYPE_4BYTE_ABGR/TYPE_3BYTE_BGR would be good.
I am aware that I can convert your float BufferedImage to such a Buffered Image either via AWT Graphics or by using the color model directly. But If its possible to do it "faster" on your end then you could perhaps directly create such a image skipping the "float" step? If its not possible then I will just stick to converting to the desired format once I do actually need JXL in my application.
This would be somewhat difficult as JXLatte decodes to float internally. There's no "float step" to skip.
Understandable, in this case i would recommend you close this.
A simple option to directly have the pixel data by itself as a ByteBuffer. Something you can directly upload in opengl. I don't mind taking a crack