I am trying to do a pyramid of tiles with a non-square image (width: 32768px and height: 18433px)
I am using libvips
as follows:
vips dzsave my_image.tif out_folder --layout google --suffix .png
For the same purpose I have also used gdal2tiles
:
python gdal2tiles.py -p raster -z 0-7 -w none my_image.tif
Because my image is not square, some padding is necessary when the 256x256
tiles are created. Padding however is different between vips
and gdal2tiles
. The former adds padding at the bottom of the tile where as the latter at the top (and is trasparent). See image below. What is shown in the the 256x256
tile at the root of the pyramid (ie zoom level=0
). I have manually added the yellow background and the black outline.
With vips
, is it possible to have similar padding to gdal2tiles
so that the bottom-left corner of the tile coincide with that from the image? I am plotting points on my image, hence it helps to have the origin at the bottom-left.
How can I also have transparent background with vips
? (that might better be in a separate post though...)