I am using windows cli version libvips. I want to generate map tiles for leaflet from image 8000px x 6000px. This image is old map of my town, and I want to display it on my website, but I am stuck on generating tiles. How to tell libvips to generate tiles from zoom level 10 to 15. With command
dzsave input.jpg outputdir --layout google
I receive tiles from zoom level 0 to 5.
And second question. How to set bounds of my map? Generated tiles from above command cover the whole world.
The libvips CLI lets you run any save operation (like
jpegsave,tiffsaveordzsave) as part of the write step of a command. You select the saver with the filename suffix and you can pass any parameters in square brackets at the end of the filename (be careful not to use any spaces).So these two commands do the same thing:
The
copycommand will runjpegsavefor you (it sees the.jpgsuffix) and setQto 90.You can select
dzsavewith the.dzsuffix. If your image is 50,000 x 50,000 pixels, you can save just the centre 50% with:I'm not sure what you mean by "layers 10 to 15". Do you only want the low-res layers? Just do a shrink by eg. 16 before running
dzsave.