[gdal-dev] question about overview?
gispowerfan at gmail.com
Wed Mar 17 09:46:36 EDT 2010
Recently I am writing a driver(such as driver_a) for GDAL, and the
driver need overview function. there are a question about
band::IReadBlock(int nBlockXOff, int BlockYOff, void *pImage), you know the
memory of pImage is malloced in the gdal core code such as new datablock
function, gdal has buildin cache management, and Its size is corresponding
overview band size, for example, origin image is 512*512, block size is
256,256, I need to get the 3rd layer of pyramid, in fact, the overview level
3 of the image is 128*128, so the memory of pImage is128*128*byte, but the
standard block of my program is 256*256, in the function of
band::IReadBlock(), I need to adjust the size of pixel data, such as
if ( blockcol<nColumnBlockSize || blockrow<nRowBlockSize )
memcpy( pImage , pabyBlockBuf, nGDALBlockBytes );
and copy the pabyBlockBuf into PImage, but now the PImage is 128*128, and
pabyBlockBuf is 256*256, so there are some mistakes. and suggestion?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gdal-dev