[gdal-dev] Zero Pixel Values in the output! Solution Please

Frank Warmerdam warmerdam at pobox.com
Wed Feb 16 08:53:11 EST 2011


On 11-02-16 03:28 AM, user gdal wrote:
> Dear all,
> I am new to GDAL and I was at fault in being too hasty in asking for
> an advanced topic in my previous post.
...
> template<class T> void CIOImg_Templ<T>::Read(const unsigned int b,
> GDALDataset* const *inds)
> {
>   ((*inds)->GetRasterBand(b+1))->RasterIO(GF_Read, 0, 0, Col, 1,
> buf[b], Col, 1, datatype, 0, 0);   // able to read the pixel values
> correctly into buffer (buf)
> }

Ramesh,

One thing I notice about your code is that you only appear to read
and write the first scanline of the image.  Is this intentional?

For the purposes of asking a question of the list it would be helpful if
you could boil your program down to a minimum example including all the
essentials.  It will require extra work on your part, but will make it
much easier for the many members of the list who might want to skim
through the code to see if they have suggestions.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the gdal-dev mailing list