How to use gdal2tiles on a custom tiff image recieved from providers to generate tiles

I think all you need to do is reproject it using:

gdalwarp -co TILED=YES -co COMPRESS=DEFLATE -t_srs EPSG:3857 newImage.tif image.tif

and then tile it:

gdal2tiles.py newImage.tif

If your file is very large it make take a while.


I suppose that your image is some of the the 4-band products by Airbus DS:

http://www.intelligence-airbusds.com/en/4951-which-spectral-mode-do-i-choose

Gdal2tiles is made for splitting common, visual images into png tiles. Such images use 8 bits per band and they have one band (greyscale), 3 bands (red-green-blue) of 4 bands (reg-green-blue + alpha).

I would say that your question is to large extent irrelevant because your source data do not suit well for gdal2tiles. You may get around the immediate problems you have right now but still the final result will still not be good if you do not re-process your data.

The reason for not-good-looking tile that you attached to your question may be that the fourth data band is interpreted to be an alpha channel.