[Gdal-dev] Can GDAL GDALDataset return compressed image data

Alison Luo alison_luo2001 at yahoo.com
Sun Jun 10 14:56:32 EDT 2007


Hi Ivan,

Thank you so much for your help. I have more questions
regarding the block of code you referred to in
nitifdataset.cpp. I also took a look of class
NITFSegmentInfo in nitflilb.h:

NITFSegmentInfo has a member hAccess, which is the
NITF image stream. I suppose other pasSegmentInfo
member     
    GUInt32 nSegmentHeaderStart;
    GUInt32 nSegmentHeaderSize;
    GUInt32 nSegmentStart;
    GUInt32 nSegmentSize;
would somehow indicate how to get the encoded jpeg
stream from hAccess? Could you please explain how the
jpeg buffer is filled given this information?

Why doesn't GDAL provide APIs to access encoded image
stream, but only provide API to get raw image stream?

Thanks,
Alison 
--- "Lucena, Ivan" <ivan.lucena at pmldnet.com> wrote:

> Alison,
> 
> Anyone, Correct me If I am wrong but I don't think
> that in the GDAL API 
> there is a function that delivers the haw compressed
> data block in a 
> buffer. But if you look at that piece of code:
> 
>
http://trac.osgeo.org/gdal/browser/trunk/gdal/frmts/nitf/nitfdataset.cpp#L908
> 
> That is where the NITF JPEG buffer is passed to the
> GDAL JPEG driver to 
> be decoded. Then, take a look at the code at:
> 
>
http://trac.osgeo.org/gdal/browser/trunk/gdal/frmts/jpeg/jpgdataset.cpp#L1099
> 
> And line 1274 where generic JPEG tables are loaded
> to make it look like 
> a JFIF file so that the libjpeg can decode it.
> 
> Regards,
> 
> Ivan
> 
> 
> Alison Luo wrote:
> > I have my own JPEG and JP2K decoder. I do not need
> > decompressed image data stream acquired from
> > GDALDataset::RasterIO. I would simply like to get
> the
> > JPEG or JP2K compressed image stream from a NITF
> file
> > through GDAL. Can this be accomplished?
> > 
> > Thanks,
> > Alison
> > 
> > 
> >        
> >
>
____________________________________________________________________________________
> > Building a website is a piece of cake. Yahoo!
> Small Business gives you all the tools to get
> online.
> > http://smallbusiness.yahoo.com/webhosting 
> > _______________________________________________
> > Gdal-dev mailing list
> > Gdal-dev at lists.maptools.org
> >
> http://lists.maptools.org/mailman/listinfo/gdal-dev
> > 
> > 
> 



       
____________________________________________________________________________________Ready for the edge of your seat? 
Check out tonight's top picks on Yahoo! TV. 
http://tv.yahoo.com/



More information about the Gdal-dev mailing list