[Gdal-dev] gdalwarp and -dstalpha
Frank Warmerdam
fwarmerdam at gmail.com
Thu Sep 8 18:41:53 EDT 2005
On 9/8/05, Eric Sokolowsky <eric.sokolowsky at gsfc.nasa.gov> wrote:
> I have experienced a strange (in my mind) problem with gdalwarp and the
> -dstalpha option. When I use this option on a couple of particular images
> that are reported as RGBA tiff files it turns them to grayscale. I am
> using gdal 1.2.5, but the same results seemed to occur with gdal 1.2.6.
> If the source image is RGB (no alpha) the output image is RGBA, as I
> expect. Is this normal/expected behavior? It would make more sense to me
> to have "-dstalpha" always add an alpha channel if it is not there, and
> to have a separate option "-dstnoalpha" to remove the alpha channel if
> present, instead of "-dstalpha" toggle the alpha, if this is the intended
> behavior.
Eric,
-dstalpha should use an existing alpha channel if there already is
one on the destination file. I just tried using gdalwarp to on an RGBA
input file with -dstalpha and the output was also RGBA.
Perhaps this was fixed since 1.2.6 (now a bit antique), or perhaps
there is something special about your situation.
The -dstalpha is not intended to toggle presence of an alpha channel.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the Gdal-dev
mailing list