WLJS LogoWLJS Notebook

ImagePartition

ImagePartition[image, s] partitions an image into an array of s×s-pixel subimages.

ImagePartition[image, {w, h}] uses subimages of width w and height h.

Examples

Partition into tiles:

img = ExampleData[{"TestImage", "Lena"}];
tiles = ImagePartition[img, 128];
Grid[tiles]

With overlap:

ImagePartition[img, {100, 100}, {50, 50}]

Please visit the official Wolfram Language Reference for more details.

On this page