openlayers - ImageMagick cropping large image into xyz tiles -
i'm having big jpg, has resolution of x * 256 / x * 256. want cutting image 256x256 tiles naming convention {zoom}-{x}-{y}.jpg. in past i've used zoomifyexpress converter cutting , zooming. want 6 different zoom levels. i've started far command:
convert example.jpg -crop 256x256 +gravity -set filename:tile ./tiles/%[fx:page.x/256]-%[fx:page.y/256] %[filename:tile].jpg
this produces lot of x-y.jpg tiles.i don't know how can add together different zoomlevels. i'm relativly new imagemagick , feels basic thing do. can help me out. in advance.
i found solution:
i resize image appropriate size , crop it. first number in filename zoom level.
convert example.jpg -resize 256x256 -crop 256x256 -set filename:tile ./tiles/0-%[fx:page.x/256]-%[fx:page.y/256] %[filename:tile].jpg
convert example.jpg -resize 512x512 -crop 256x256 -set filename:tile ./tiles/1-%[fx:page.x/(256)]-%[fx:page.y/(256)] %[filename:tile].jpg
.. , on until reach highest resolution.
imagemagick openlayers openstreetmap zoomify
No comments:
Post a Comment