slicerdicer

Slice and dice an image, turning it into many equal sized tiles. Useful for things like leaflet.js, with the Leaflet.Zoomify plugin.

The image is sliced up into equal sized tiles, based on the command line option --tile-size (default 512 pixels).

Once the tiling is finished, the original is resized to half its current dimensions (the orignal file on disk is not touched) and the process repeats. Each halving is a new "zoom level".

Each file is named something like:

tile-z-x-y.png

Where 'z' is the zoom level, x and y are the coordinates, with 0,0 being the top left tile.

Usage

slicerdicer --help

slicerdicer --filename foo.png --tile-size 256 --concurrency 5

Notes

It's going to eat some memory.

In my tests on an 32641 x 16471, 8-bit/color RGB PNG, memory usage peaks at around 2.7GB.

Description
Slice a large image up into many tiles
Readme 109 KiB
0.02 Latest
2024-06-04 08:48:33 +09:30
Languages
Go 100%