On jeudi 12 avril 2018 12:22:27 CEST Bob Pasteur wrote:
> Hi, can anybody tell me if the latest OpenJPEG code has support for float
> as the data type of a component?
JPEG2000, at least in its Part-1 implemented in OpenJPEG, has no provision for
floating point data. So if you want to support it, you'll have to use tricks/
hacks.
For another project I'm involved in, which uses different backends for
JPEG2000 support, one of the backend has support for Float32 using the
following trick:
SPLIT_IEEE754=YES/NO: Whether encoding of Float32 bands as 3 bands with values
decomposed according to IEEE-754 struture: first band (1 bit, signed) with
sign bit, second band (8 bits, unsigned) with exponent value and third band
(23 bits, unsigned) with mantissa value. Default to NO. This is a non-standard
extension to encode floating point values. By default, the sign bit and
exponent will be encoded with the reversible wavelet (even with
REVERSIBLE=NO), and the mantissa with the irreversible one. If specifying
REVERSIBLE=YES, all 3 components will be encoded with the reversible wavelet.
(This is taken from
http://gdal.org/frmt_jp2lura.html )
This could probably be done with OpenJPEG as well. The only thing to chck is
that the 23bits mantissa channel is properly supported by OpenJPEG.
Even
--
Spatialys - Geospatial professional services
http://www.spatialys.com