int bands[4] = { 3, 2, 1, 4 };
GDALDataset::RasterIO(..., 4, bands, 32, 32 * xSize, 1);
but then you probably mixed bits with bytes so:
int bands[4] = { 3, 2, 1, 4 };
GDALDataset::RasterIO(..., 4, bands, 4, 4 * xSize, 1);
[EMAIL PROTECTED] wrote:
I have a BGRA buffer in memory, and a multi-band
This is how i do it. I hope it is what you want:)
GByte *myGdalScanData=(GByte *)
CPLMalloc(theRasterViewport->drawableAreaXDim*theRasterViewport->drawableAreaYDim*4);
if (myGdalScanData == NULL)
{
std::cout<<"scan data is null! ";
}
else
{
CPLErr myErr = GDA
I have a BGRA buffer in memory, and a multi-band RGBA TIF image. Is it
possible to use RasterIO to read in values from each band and neatly interleave
them in my buffer.
For example if I was loading an RGBA image I am hoping to be able to make 4
separate RasterIO calls.
Assuming a BGRA imag
Excellent! Thanks very much for the info, and links to the docs.
--
On Sat, Oct 18, 2008 at 12:40 AM, Klokan Petr Přidal <[EMAIL PROTECTED]>wrote:
> Hi Roger,
>
> Matt answered the question already...
>
> The official documentation for handling masks and nodata values in GDAL is:
> http://trac.o
Hi Roger,
Matt answered the question already...
The official documentation for handling masks and nodata values in GDAL is:
http://trac.osgeo.org/gdal/wiki/rfc15_nodatabitmask
and the complete python interface is tested in this file:
http://trac.osgeo.org/gdal/browser/trunk/autotest/gcore/mask.p