<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7654.12">
<TITLE>gdal2tiles - transparent area on base image becomes opaque in tiles</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>Hi,<BR>
<BR>
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.<BR>
<BR>
Here's the base image:<BR>
&nbsp; <A HREF="http://dev.andrewnicolaou.co.uk/m/#base">http://dev.andrewnicolaou.co.uk/m/#base</A><BR>
&nbsp;<BR>
These are the steps I'm doing:<BR>
<BR>
1. Create a VRT from base image:<BR>
<BR>
&nbsp;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<BR>
<BR>
2. Translating the base image into EPSG:900913:<BR>
<BR>
&nbsp; gdalwarp -of VRT -t_srs EPSG:900913 base.vrt base_mercator.vrt<BR>
<BR>
3. Generate the tiles:<BR>
&nbsp;<BR>
&nbsp; gdal2tiles.py --zoom=0-9 --no-kml --webviewer=openlayers base_mercator.vrt<BR>
<BR>
The problem is that the transparent area in the base image appears as solid black on the tiles:<BR>
&nbsp; <A HREF="http://dev.andrewnicolaou.co.uk/m/#tile">http://dev.andrewnicolaou.co.uk/m/#tile</A><BR>
<BR>
If I don't generate the tiles, but just a single translated image, then the transparency is maintained:<BR>
&nbsp; <A HREF="http://dev.andrewnicolaou.co.uk/m/#mercator">http://dev.andrewnicolaou.co.uk/m/#mercator</A><BR>
<BR>
Can anyone see what I'm doing wrong? I'd expect that the base image transparency would carry over to the output tiles.<BR>
<BR>
Many thanks,<BR>
Andrew</FONT>
</P>

<DIV>&nbsp;</DIV><br/><font size="3" face="Times New Roman"><a href="http://www.bbc.co.uk">http://www.bbc.co.uk</a><br/>This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.<br/>If you have received it in error, please delete it from your system.<br/>Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.<br/>Please note that the BBC monitors e-mails sent or received.<br/>Further communication will signify your consent to this.</font>
</BODY>
</HTML>