Re: generating multiple tile zoom levels from a single convert
Posted: 2009-06-18T15:18:14-07:00
try something like this. Using 512x512 mandril2.png and cropping out 128x128 tiles. This makes 16 tiles at level A and 4 tiles at level B.
convert mandril2.png \
\( -clone 0 -crop 128x128 +repage -write mandril2A.jpg \) \
\( -clone 0 -scale 50% -crop 128x128 +repage -write mandril2B.jpg \) \
null:
If you leave off the +repage, then the tiles keep their virtual canvas positions so that they can be put together later after further processing on each. See http://www.imagemagick.org/Usage/crop/#crop_tile (But I am not sure you can use jpg and have it carry the virtual canvas information - use gif or png as I believe those work)
(I believe that IM supports a tiled pyramid TIF format as well, so should/could make them automatically?)
convert mandril2.png \
\( -clone 0 -crop 128x128 +repage -write mandril2A.jpg \) \
\( -clone 0 -scale 50% -crop 128x128 +repage -write mandril2B.jpg \) \
null:
If you leave off the +repage, then the tiles keep their virtual canvas positions so that they can be put together later after further processing on each. See http://www.imagemagick.org/Usage/crop/#crop_tile (But I am not sure you can use jpg and have it carry the virtual canvas information - use gif or png as I believe those work)
(I believe that IM supports a tiled pyramid TIF format as well, so should/could make them automatically?)