[gdal-dev] Extracting Jpeg2000 image from nitf file
Tobby Moalem
mtobby59 at gmail.com
Fri May 26 23:35:21 PDT 2023
Hi Even,
Thanks for the help.
I was wondering if I could just get this byte range from the file, and save
it as jpeg2000 (with .j2c or something like that) and have a valid jpeg2000?
My goal is to be able to extract the jpeg2000 without using gdal_translate
in order to save time and resources (cpu, ram, ...), as for my
understanding the gdal_translate will always recompress the image.
Thanks,
Tobby
On Fri, May 26, 2023 at 1:09 PM Even Rouault <even.rouault at spatialys.com>
wrote:
> Hi,
>
> if you open such an image with debug traces (CPL_DEBUG=ON), you'll see
> something like
>
> GDAL: GDALOpen(/vsisubfile/907_565,byte.ntf, this=....) succeeds as
> JP2OpenJPEG
>
> which means that the JPEG2000 file starts at byte 907 with a length of
> 565 bytes.
>
> Programatically from C/C++ , you could use the GDALGetOpenDatasets()
> methods after having opening the NITF file, and look for /vsisubfile/ files
>
> Even
>
> Le 26/05/2023 à 08:57, Tobby Moalem a écrit :
> > Hi,
> > For my understanding the nitf file is used as container, where
> > compressed jpeg2000 can be saved inside the nitf file.
> > I wonder if there is a way to use gdal to extract the jpeg2000 part
> > and save it separately (with extension of .j2c or other jpeg2000
> > extensions) ?
> >
> > Thanks in advance,
> > Tobby
> >
> > _______________________________________________
> > gdal-dev mailing list
> > gdal-dev at lists.osgeo.org
> > https://lists.osgeo.org/mailman/listinfo/gdal-dev
>
> --
> http://www.spatialys.com
> My software is free, but my time generally not.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20230527/911d09bd/attachment.htm>
More information about the gdal-dev
mailing list