<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Am 29.06.2010 18:23, schrieb Chaitanya kumar CH:
<blockquote
 cite="mid:AANLkTikD1dGgEroZju1s79aDtpiWK2BKCfL643LCNNFB@mail.gmail.com"
 type="cite">Stefan,<br>
  <br>
I haven't tested the script but doesn't the current code copy the alpha
band? If it does, it might be more preferable to copy all the pixels
and the alpha band.<br>
</blockquote>
Yes the current code copies the alpha band, but it uses the same nodata
settings as the other bands. <br>
This gets interesting if I want to merge overlapping images which
define their valid area by an alpha channel. In the current code, I
would have to specify nodata=0 to get the alpha channel to merge
correctly. This is counterintuitive, as I expect images with alpha to
merge correctly without specifying a value for nodata.<br>
If nodata isn't specified the merged alpha of overlapping images is
incorrect (as opaque areas get overwritten with the transparent parts
(nodata) )<br>
<blockquote
 cite="mid:AANLkTikD1dGgEroZju1s79aDtpiWK2BKCfL643LCNNFB@mail.gmail.com"
 type="cite"><br>
Please create a ticket at <a moz-do-not-send="true"
 href="http://trac.osgeo.org/gdal/newticket">http://trac.osgeo.org/gdal/newticket</a>
and attach your patch.<br>
</blockquote>
Done... <a class="moz-txt-link-freetext"
 href="http://trac.osgeo.org/gdal/ticket/3669">http://trac.osgeo.org/gdal/ticket/3669</a><br>
<br>
Regards<br>
Stefan<br>
<blockquote
 cite="mid:AANLkTikD1dGgEroZju1s79aDtpiWK2BKCfL643LCNNFB@mail.gmail.com"
 type="cite"><br>
  <div class="gmail_quote">On Tue, Jun 29, 2010 at 8:19 PM, Stefan Klug
  <span dir="ltr">&lt;<a moz-do-not-send="true"
 href="mailto:Klug.Stefan@gmx.de">Klug.Stefan@gmx.de</a>&gt;</span>
wrote:<br>
  <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,<br>
    <br>
gdal_merge.py doesn't handle tiff files with alpha masks so I've added
this functionality.<br>
    <br>
My patch changes the behaviour of gdal_merge as follows:<br>
- If a band is recognized as Alpha Band it is automatically treated as
having a NODATA value of 0.<br>
I'm not sure if this is the way to go. But it makes some sense, as the
resulting alpha channel is a correct alpha merge, independent of the
nodata value used for the other bands.<br>
- If a band has mask flag GMF_ALPHA set, the mask band controls the
parts that get written to the destination<br>
    <br>
Would be great if someone could review and possibly checkin the patch.<br>
    <br>
Regards<br>
    <font color="#888888">    Stefan<br>
    <br>
    <br>
    <br>
    </font><br>
_______________________________________________<br>
gdal-dev mailing list<br>
    <a moz-do-not-send="true" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
    <a moz-do-not-send="true"
 href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
  </blockquote>
  </div>
  <br>
  <br clear="all">
  <br>
-- <br>
Best regards,<br>
Chaitanya kumar CH.<br>
/tʃaɪθənjə/ /kʊmɑr/ <br>
+91-9494447584<br>
17.2416N 80.1426E<br>
</blockquote>
<br>
<br>
</body>
</html>