[gdal-dev] write JPEG2000 with codek KAKADU without .tif
Evgeniy Borovenskiy
eborovenskiy at scanex.ru
Thu Aug 16 04:53:18 PDT 2012
No, at the moment I use the variant in which the file '.tif' with the use of the driver GTiffDataset is created. And then through CreateCopy() JPEG2000 is created.
I'd like to create a JPEG2000 file straigh away because the size of images are very big and the intermediate file '.tif' can be more than 20GB. In one of the examples of KAKADU compressor it said that it's possible to record not the whole picture at once but to record the pictures in parts. Am I write or it's impossible to record the pictures in parts?
Is it possible to write the function 'create' for KAKADU that will create the driver for the direct record of JPEG2000 for the buffer (it's desirable to record the picture in parts)?
Evgeniy
-----Original Message-----
From: Even Rouault [mailto:even.rouault at mines-paris.org]
Sent: Thursday, August 16, 2012 3:15 PM
To: Evgeniy Borovenskiy
Cc: gdal-dev at lists.osgeo.org
Subject: Re: [gdal-dev] write JPEG2000 with codek KAKADU without .tif
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