JP2 export of Float32 data

The JP2 writer currently doesn’t support > 16 bit data types. Is this a limitation of OpenJPEG or is it something that could be implemented in the JP2 writer? The JPEG2000 format does support Float32 bit depth.

Hi Luis.

Yes, it’s a limitation of the OpenJPEG library (at least the version used only knows how to deal with up to 16 bits integers).
I think we can make something similar to Sentinel-2 products. Namely, to convert Float32 to Int16, and to add in the JP2 header the gain factor (and, of course, to make the JP2 reader aware of this).

Cheers,
Cosmin.

thanks Cosmin