<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    This sounds more like a problem with a missing NODATA value rather
    than transparency/alpha. As far as I can tell from the docs, there
    is no means to specify the NODATA value in the gdal_retile command,
    including the CO options. If the only place that true black occurs
    is in the regions with no input, you could use gdal_edit.py to add a
    NODATA value.<br>
    <br>
    On 5/3/2015 11:23 PM, Tom Wardrop wrote:
    <blockquote type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <div style="font-family: Calibri, sans-serif; font-size: 14px;
        color: rgb(0, 0, 0);">
        Hi all,</div>
      <div style="font-family: Calibri, sans-serif; font-size: 14px;
        color: rgb(0, 0, 0);">
        <br>
      </div>
      <div style="font-family: Calibri, sans-serif; font-size: 14px;
        color: rgb(0, 0, 0);">
        I retiled whole lot of imagery over the weekend using the
        following gdal_retile command:</div>
      <div style="font-family: Calibri, sans-serif; font-size: 14px;"><br>
      </div>
      <div style="font-family: Calibri, sans-serif; font-size: 14px;">
        <p style="margin: 0px; font-size: 12px; font-family: Courier;">gdal_retile.py
          -v -r bilinear -levels 8 -ps 2048 2048 -s_srs EPSG:28355 -co
          "TILED=YES" -co "ALPHA=YES" -targetDir ~/output ~/input/*.tif</p>
      </div>
      <div style="font-family: Calibri, sans-serif; font-size: 14px;"><br>
      </div>
      <div style="font-family: Calibri, sans-serif; font-size: 14px;">The
        result was good until I realised all the areas that should be
        transparent were instead black. It seems the problem is the
        source imagery didn’t have an alpha channel; it didn’t need one
        as there was no transparent data to represent. Because the
        source imagery didn’t fill the entire extent, gdal_retile had to
        create loads of transparent and partially-transparent tiles,
        which of course wound up black.</div>
      <div style="font-family: Calibri, sans-serif; font-size: 14px;"><br>
      </div>
      <div><font face="Calibri,sans-serif">I was under the impression
          that "</font><font face="Courier"><span style="font-size:
            12px;">-co ALPHA=YES</span></font><font
          face="Calibri,sans-serif">” would instruct gdal_retile to
          generate an alpha channel for all the generated tiles. Is this
          a bug? If not, how do I otherwise instruct </font><font
          face="Calibri,sans-serif">gdal_retile to generate an alpha
          channel when required?</font></div>
      <div><font face="Calibri,sans-serif"><br>
        </font></div>
      <div><font face="Calibri,sans-serif">I’m working around this by
          using gdal_translate to re-save the source imagery with an
          (empty) alpha channel, so gdal_retile now outputs
          transparent tiles. </font></div>
      <div><font face="Calibri,sans-serif"><br>
        </font></div>
      <div><font face="Calibri,sans-serif">Any feedback is appreciated.</font></div>
      <div>
        <p class="MsoNormal" style="font-family: Calibri, sans-serif;
          font-size: 11pt; margin: 0cm 0cm 0.0001pt;">
          <br>
        </p>
        <p class="MsoNormal" style="color: rgb(0, 0, 0); margin: 0cm 0cm
          0.0001pt;">Cheers,</p>
        <p class="MsoNormal" style="color: rgb(0, 0, 0); margin: 0cm 0cm
          0.0001pt;">Tom</p>
        <p class="MsoNormal" style="font-family: Calibri, sans-serif;
          font-size: 11pt; color: rgb(0, 0, 0); margin: 0cm 0cm
          0.0001pt;">
          <o:p> </o:p></p>
      </div>
      <br>
    </blockquote>
    <br>
  </body>
</html>