[gdal-dev] Transparent background in hillshade map
Elena Ruiz
eruiz at aplitop.com
Mon Apr 29 01:17:21 PDT 2024
Hello, I am using GDAL version 3.6.2 to make a Hillshade map from an elevation map (tif) using the gdaldem command.
My question is because I need the background of the image generated with the previous command to be transparent,
I have tried different ways but it usually gives me this error:
ERROR 1: Error: band 1 has no color table
These are the commands I have tried:
gdal_translate -b 1 -b 1 -b 1 -b 1 -ot UInt16 --> Generates image with four bands, but all in white
gdal_translate -co PHOTOMETRIC=RGB -co ALPHA=YES--> gives ERROR1
gdal_translate -expand rgba --> gives ERROR1
gdalwarp -dstalpha -->creates an image with a transparent background with two bands, but AUTOCAD does not recognize it well and considers the entire image transparent and not just the background.
Could you give me any solution?
Thanks and regards.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20240429/5414fd3d/attachment-0001.htm>
More information about the gdal-dev
mailing list