[Gdal-dev] MrSID driver with 16bit output
Frank Warmerdam
warmerdam at pobox.com
Fri Feb 17 11:55:38 EST 2006
Chapman, Martin wrote:
> I have a 16bit (GDT_UInt16) tiff file that I am trying to copy to a
> UInt16 jp2 file using the MrSID esdk 6.x driver. When I try to remap it
> to 8-bit uchar it works fine. When I try to just copy it to jp2 it
> fails. It looks like the only diff between the two operations is the
> datatype used to initialize the JP2WriterManager object in the
> JP2CreateCopy() method of the mrsiddataset.cpp file. In
> MrSIDDummyImageReader::initialize() the datatype is set to
> LTI_DATATYPE_UINT16 instead of LTI_DATATYPE_UINT8. Can anyone confirm
> this to be a problem in the GDAL mrsid driver?
Martin / Kirk,
Could you verify your file is UInt16? I tried with an Int16 file, and
it crashed. It turns out I wasn't checking return values from stuff
like the initialize() method, and it was returning an error code indicating
"unsupported datatype [50903]". If I force the output type to UInt16 things
seem to work fine. This was all with Geo_ESDK-5.0.6.962. Perhaps behavior
has changed in ESDK 6?
I am going to tighten up the error checking a bunch, but I don't see much
other action I can take for now. Kirk can you comment on LTI_DATATYPE_
values that should work with JPEG2000?
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the Gdal-dev
mailing list