This is documentation for Mathematica 7, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

ImagePartition

ImagePartition[image, s]
partitions an image into an array of s×s-pixel subimages.
ImagePartition[image, {w, h}]
partitions an image into an array of subimages of pixel width w and pixel height h.
ImagePartition[image, {w, h}, {dw, dh}]
uses pixel offsets dw and dh.
  • ImagePartition[image, s] generates as many s×s subimages as possible, dropping incomplete subimages at the edges.
  • ImagePartition[image, {s}] instead includes incomplete subimages at the edges.
  • In ImagePartition[image, {wspec, hspec}, ...], the following forms can be used for wspec and hspec:
sallow only size s
{s}allow any size up to s
{smin,smax}allow any size smin through smax
  • The default setting is Padding->None, which drops subimages at the edges whose sizes are not consistent with {wspec, hspec}.
  • All other standard settings for Padding are also supported.
Partition an image into blocks of size 16 by 16:
Partition into equal-size blocks, dropping some pixels at the borders:
Partition into blocks not larger than the specified size, including all pixels from the image:
Partition an image into blocks of size 16 by 16:
In[1]:=
Click for copyable input
Out[1]=
 
Partition into equal-size blocks, dropping some pixels at the borders:
In[1]:=
Click for copyable input
Out[1]=
Partition into blocks not larger than the specified size, including all pixels from the image:
In[2]:=
Click for copyable input
Out[2]=
Create a mosaic effect by averaging colors in small partitions:
New in 7