Re: [gdal-dev] GDALWarp API and paletted images

2015-06-12 Thread Thomas Sevaldrud
I have those nodata-values there since the same code path is used for elevation data and such, but it had no effect to remove it. I have narrowed it down to the case where I use an overview as input. I have some very large images with overviews, so I find the overview closest matching to the outpu

Re: [gdal-dev] GDALWarp API and paletted images

2015-06-12 Thread Even Rouault
Selon Thomas Sevaldrud : > Thanks again! The problem was in the warper setup, it used only the first > band of the image. This also revealed a bug in another part of my code > related to VRT's and Warp, since I had added double sets of bands there as > well. However, when fixing this, some old cod

Re: [gdal-dev] GDALWarp API and paletted images

2015-06-12 Thread Thomas Sevaldrud
Thanks again! The problem was in the warper setup, it used only the first band of the image. This also revealed a bug in another part of my code related to VRT's and Warp, since I had added double sets of bands there as well. However, when fixing this, some old code stopped working :-) Basically,

Re: [gdal-dev] GDALWarp API and paletted images

2015-06-11 Thread Even Rouault
Selon Thomas Sevaldrud : > Great, thanks! > > I tried this, but got only a red image as result, so I guess only the first > channel was used. > > This is the relevant code, where _ds is the input paletted data set > > vrtDS = vrtDriver->Create("", origW, origH, 3, GDT_Byte, NULL); > double geoTran

Re: [gdal-dev] GDALWarp API and paletted images

2015-06-11 Thread Thomas Sevaldrud
Great, thanks! I tried this, but got only a red image as result, so I guess only the first channel was used. This is the relevant code, where _ds is the input paletted data set vrtDS = vrtDriver->Create("", origW, origH, 3, GDT_Byte, NULL); double geoTransform[6]; _ds->GetGeoTransform(geoTransfo

Re: [gdal-dev] GDALWarp API and paletted images

2015-06-09 Thread Even Rouault
Thomas, > > I'm using the GDALWarp api from C++ to reproject and cut various input > images. In general this works very well for my purposes, except that for > paletted images I have to use NearestNeighbour resampling, > > I would like to use Bilinear or higher order resampling, and wonder if > the

[gdal-dev] GDALWarp API and paletted images

2015-06-09 Thread Thomas Sevaldrud
Hi, I'm using the GDALWarp api from C++ to reproject and cut various input images. In general this works very well for my purposes, except that for paletted images I have to use NearestNeighbour resampling, I would like to use Bilinear or higher order resampling, and wonder if there is any way to