[gdal-dev] gdal2tiles - transparent area on base image becomes
opaque in tiles
Andrew.Nicolaou at bbc.co.uk
Thu Mar 25 13:30:04 EDT 2010
I'm using gdal2tiles but I'm having problems with the alpha on some of the tiles output. The base PNG has some transparent areas but the final tiles output have those areas as opaque black.
Here's the base image:
These are the steps I'm doing:
1. Create a VRT from base image:
gdal_translate -of VRT -a_srs EPSG:4326 -gcp 0 0 -10 65 -gcp 512 0 0 65 -gcp 512 768 0 50 base.png base.vrt
2. Translating the base image into EPSG:900913:
gdalwarp -of VRT -t_srs EPSG:900913 base.vrt base_mercator.vrt
3. Generate the tiles:
gdal2tiles.py --zoom=0-9 --no-kml --webviewer=openlayers base_mercator.vrt
The problem is that the transparent area in the base image appears as solid black on the tiles:
If I don't generate the tiles, but just a single translated image, then the transparency is maintained:
Can anyone see what I'm doing wrong? I'd expect that the base image transparency would carry over to the output tiles.
This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gdal-dev