[FWTools] Error when reading data from an image

Aurora Sánchez Fernández aurorita2581 at hotmail.com
Fri Jun 12 07:17:19 EST 2009


First of all, thanks to everyone who is there helping solving the problems we have.. 

I'm quite new using GDAL and just realized that when I'm reading the data of an image, all I get are nulls.. This is the code I'm using:

    float* rasterData;
    nXSize = GDALGetRasterBandXSize( hBand );

    rasterData = (float *) CPLMalloc(sizeof(float)*nXSize/2);
    GDALRasterIO(hBand, GF_Read, 0,0,nXSize,1,rasterData,nXSize,1,GDT_Float32, 0, 0 );

I got it from an example and thought that everything was working on well.. I have tried with different data types, not only float, but I always get zeros in all positions of rasterData. The image I'm reading is a TIFF image. Any one has an idea of what is happening??

Thank you very much!


Nuevo Windows Live, un mundo lleno de posibilidades. Descúbrelo.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/fwtools/attachments/20090612/79d19f13/attachment.htm 

More information about the FWTools mailing list