[Gdal-dev] gdalwarp nodata

Richard Greenwood richard.greenwood at gmail.com
Sun Nov 14 16:02:05 EST 2004


> On Sun, 14 Nov 2004 00:03:34 -0500, Frank Warmerdam <warmerdam at pobox.com> wrote:
> 
> > Rich,
> >
> > OK, I have finally connected up the alpha support properly through
> > the warp architecture - at least I think I have.  It is now possible
> > to overlay an image with alpha values on another image with alpha values
> > and get proper mixing, and proper setting of merged alpha values in the
> > output image.
> >
> > You might want to grab a nightly snapshot or build from CVS if you are
> > interested in taking advantage of this.
> >
> > gdalwarp now has -srcalpha and -dstalpha switches. -srcalpha will be
> > implicitly enabled if the last band of thei input file is recognised as
> > being an alpha band.  Likewise -dstalpha will be automatically set if the
> > destination file already exists, and the last band (or perhaps the next
> > band after the bands being transferred?) is marked as an alpha band.
> >
> > If you are creating an output file and want an alpha band you need to set
> > the -dstalpha explicitly, even if the source file has an alpha band.

Frank,

Following up on a couple things:

1. The new gdalwarp alpha channel support works great. I built on
windows. It does not automatically detect alpha channels created by
Photoshop or AutoCAD CadOverlay, but specifying the  -srcalpha switch
does the trick.

2. In my previous email I described an error : 'UnsignedInt16 is not
defined' when trying to run your Python script under the FWTools0.9.3
binary distribution environment. I have since installed Python 2.3.4,
Numeric 23.6, and built gdal 1.2.4 cvs w/ HAVE_NUMPY=1. The script now
runs, but which of the above changes got it running I am not sure. I
am sort of suspicious of the:
     set PYTHONPATH=%FWTOOLS_DIR%\pymod;%FWTOOLS_DIR%\numpy
line in setfwenv.bat because there is no 'numby' directory.

Thank you very much for your help.

Rich
-- 
Richard Greenwood
richard.greenwood at gmail.com
www.greenwoodmap.com



More information about the Gdal-dev mailing list