[gdal-dev] write JPEG2000 with codek KAKADU without .tif
Even Rouault
even.rouault at mines-paris.org
Thu Aug 16 04:15:28 PDT 2012
Selon Evgeniy Borovenskiy <eborovenskiy at scanex.ru>:
> The thing is when I try to save the buffer with an image that is being saved
> in the operative memory when my program is working and when the KAKADU's
> driver tries to create JPEG2000 for the file recording the driver isn't
> created. It's because there's no function 'Create' in JP2KAKDataset. But
> there's the function 'JP2KAKCreateCopy' in which the recording of JPEG2000
> format happens from the file with the format .tif. The driver GTiffDataset is
> created when it's impossible to create the driver for KAKADU. The question is
> this: is it possible to make a record JPEG2000 directly? Is it possible to
> create the driver KAKADU directly, to write the function 'Create' for KAKADU
> and why has it happened before?
Realitvely few drivers that have write capabilities support the Create() method
(because this requires to be able to do random write in the file), and support
only CreateCopy() which needs an existing source dataset.
If I understand well your use case, you have a memory buffer that you want to
save as a JPEG2000 image with the Kakadu driver. You could create a MEM dataset
(see the doc of the MEM driver), and use it as the source dataset for the call
of CreateCopy() on the Kakadu driver.
>
>
> Evgeniy
>
More information about the gdal-dev
mailing list