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.roua...@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@lists.osgeo.org > > https://lists.osgeo.org/mailman/listinfo/gdal-dev > > -- > http://www.spatialys.com > My software is free, but my time generally not. > >
_______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev