[Gdal-dev] Can GDAL GDALDataset return compressed image data
Lucena, Ivan
ivan.lucena at pmldnet.com
Sun Jun 10 23:32:41 EDT 2007
I think that Frank gave you the all answers.
Frank Warmerdam wrote:
> Alison Luo wrote:
>> 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.
>
> Alison,
>
> It is a pointer to the NITFImage structure for image segemnts.
>
> > 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?
>
> They are information on where the image header, and image
> data chunks are in the file. So compressed data stream
> would consist of nSegmentSize bytes started at byte nSegmentStart
> in the file.
>
>> Why doesn't GDAL provide APIs to access encoded image
>> stream, but only provide API to get raw image stream?
>
> GDAL does not provide direct access to compressed datastreams
> because the purpose of GDAL is to provide a "normalized" view to
> different datasets, not to provide low level access.
>
> Best regards,
More information about the Gdal-dev
mailing list