[gdal-dev] Cannot set transparent color for GeoTIFFs

Ralf Wagner rpw at globema.pl
Mon Feb 8 07:13:37 EST 2010


Unfortunately I have absolutely no idea how to deal with this 
transparency problem - all my trials failed.
I am experimenting on four properly referenced GeoTiff, overlapping 
files with white margins.
My (temporary) goal was to obtain ONE GeoTIFF file from these FOUR 
source files - but, of course, without white margins between them.
So, first I created VRT file from my source GeoTiffs:

gdalbuildvrt -srcnodata "255 255 255" All.vrt Ac3.tif Ac4.tif Ca1.tif 
Ca2.tif

and then GeoTiff from this VRT file:

gdal_translate -of GTiff All.vrt All.tif

But white stripes still existed. Also, additional step of creating 
separate VRT files for each GeoTiff file and using these files as 
components for "All.vrt" didn't help. Messing around with -vrtnodata, 
-hidenodata etc. didn't help also. Using -addalpha option causes warning 
during destination GeoTiff file generation: "Unable to export color 
table to GeoTIFF file" and resulting file is broken.

So, I am stuck...

Do you have any idea what can I try next?

Best regards,
Ralf Wagner


More information about the gdal-dev mailing list