[Gdal-dev] nodata -> alpha in TIFF output?

William Kyngesburye woklist at kyngchaos.com
Sat Jun 17 13:30:49 EDT 2006


I want to convert an RGB image group from GRASS, which has null/ 
nodata cells to an RGB TIFF with an alpha channel for the nodata  
cells.  I see that the TIFF format has an ALPHA=YES creation option,  
but that assumes that I have an extra band in the input for the  
nodata cells.  Is there a direct method/option, or do I need to add a  
nodata band to the GRASS image group?

The -a_nodata option doesn't seem to work for multiband images (ie - 
a_nodata 0,0,0 or just 0).  If it did I could take the first  
conversion where the nodata values become black and convert it again  
with the nodata option.  Assuming I don't have any pure black in the  
actual image.

-----
William Kyngesburye <kyngchaos at kyngchaos.com>
http://www.kyngchaos.com/

[Trillian]  What are you supposed to do WITH a maniacally depressed  
robot?

[Marvin]  You think you have problems?  What are you supposed to do  
if you ARE a maniacally depressed robot?  No, don't try and answer,  
I'm 50,000 times more intelligent than you and even I don't know the  
answer...

- HitchHiker's Guide to the Galaxy




More information about the Gdal-dev mailing list