[gdal-dev] gdalwarp -dstalpha does not create alpha band

John W. Glendening glendening at drjack.net
Tue Feb 11 19:24:52 PST 2020


Jukka

After reading your message assuring me that -dstalpha does work for
others, and since what I was doing seemed so basic, I decided to
re-boot my computer and try again (I have recently been using some
large graphics files).  Lo and behold I am now getting the expected
result, transparency outside the original image area.  :-)  Thanks for
your response.

Jack


On Mon, 2020-02-10 at 02:26 -0700, jratike80 wrote:
> Hi,
> 
> It does really work for others. I just verified with GDAL 3.1.0dev and 2.4.2
> on Windows. Could you repeat the test carefully with the bare minimum
> 
> gdalwarp -dstalpha without_alpha.tif with_alpha.tif
> 
> If it does not work please arrange a reproducible test case for us by
> telling how to get exactly same GDAL version as you have, and point same
> source tiff file as input.
> 
> -Jukka Rahkonen-
> 
> 
> Jack Glendening wrote
> > For gdalwarp (GDAL 2.3.1), using -dstalpha (hoping to get transparent
> > pixels outside the original image area) ala 
> > 
> >  gdalwarp -dstalpha -srcnodata 0 -t_srs EPSG:4326 in.tif out.tif 
> > 
> > for an input geotiff RGB image (created by gdal_translate) I get an RGB
> > output image, not an RGBA as I expected. From googling, it appears
> > -dstalpha works for others. This seems so simple, cannot understand
> > what could be going wrong.
> > 
> > Jack 
> > 
> > 
> > _______________________________________________
> > gdal-dev mailing list
> 
> > gdal-dev at .osgeo
> 
> > https://lists.osgeo.org/mailman/listinfo/gdal-dev
> 
> 
> 
> 
> 
> --
> Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev

-- 
John W. (Jack) Glendening  831-484-6929
25953 Deer Run Lane  Salinas, CA  93908



More information about the gdal-dev mailing list