[gdal-dev] Working with gdalwarp -dstalpha to add transparency to a GeoTIFF

Alexandre Leroux alexandre.leroux at ec.gc.ca
Fri Dec 14 07:48:22 PST 2012


Hi list,

This should simple, but I failed to make it work. I simply want a black 
pixels in a RGB GeoTIFF to become transparent or white. Using GDAL 1.6.3.

I'm trying
	gdalwarp -srcnodata 0 -dstalpha in.tif out.tif

I also tried (since it's RGB)
	gdalwarp -srcnodata "0 0 0" -dstalpha in.tif out.tif

I always get
0...10...20...30...40...50...60...70...80...90...100 - done.
but no transparency is actually added to the output tif.

References:
http://www.gdal.org/gdalwarp.html
http://lists.maptools.org/pipermail/fwtools/2007-February/000691.html

Any clue what's missing?

Thanks a lot!

Alex
-- 
Alexandre Leroux, M.Sc., ing.
MSC Data Management Section /
Section de gestion des données du SMC
Environment Canada / Environnement Canada
alexandre.leroux at ec.gc.ca - (514) 421-5024


More information about the gdal-dev mailing list