[gdal-dev] gdal2tiles.py doesn't transparent raster png

varchar varchar2 at gmail.com
Wed May 8 07:39:43 PDT 2019


The transparent color of PNG is 255,255,255.
 
GDALINFO on the PNG file is
Driver: PNG/Portable Network Graphics
Size is 12800, 12800
Coordinate System is `'
Image Structure Metadata:
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  (    0.0,    0.0)
Lower Left  (    0.0,12800.0)
Upper Right (12800.0,    0.0)
Lower Right (12800.0,12800.0)
Center      ( 6400.0, 6400.0)
Band 1 Block=12800x1 Type=Byte, ColorInterp=Red
    Computed Min/Max=0.000,255.000
  Mask Flags: PER_DATASET ALPHA
Band 2 Block=12800x1 Type=Byte, ColorInterp=Green
    Computed Min/Max=0.000,255.000
  Mask Flags: PER_DATASET ALPHA
Band 3 Block=12800x1 Type=Byte, ColorInterp=Blue
    Computed Min/Max=0.000,255.000
  Mask Flags: PER_DATASET ALPHA
Band 4 Block=12800x1 Type=Byte, ColorInterp=Alpha
    Computed Min/Max=255.000,255.000

Having tried various command lines as below, I am still see the png files
within background in tiles folder. 
python gdal2tiles.py -p raster input.png tiles -a 255,255,255
python gdal2tiles.py -p raster input.png tiles -a 255,255,255,255
python gdal2tiles.py -p raster input.jpg tiles -a 255,255,255
python gdal2tiles.py -p raster input.tif tiles -a 255,255,255,255

Did I miss something at somewhere?



--
Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html


More information about the gdal-dev mailing list