Here a script (R13) + tutorial explaining the Python code behind it, to posterize files.
For example, this icon was ‘posterized’.
The script asks for an input file and some input variables.
Then, based on given input factor, the average pixel color is calculated, an object (Cube or Sphere) is created and a material with the calculated average color created and assigned.
Example: The file is 512×512 and the input factor is 32.
This means that the picture will be ‘divide / posterized’ in 512 / 32 = 16 parts.
Each part is sampled and the average color is calculated. For each part an new objects will be created with the calculated average color.
In total 16*16 = 512 objects will be created.
Here you can download the source and an tutorial explaining the use and the Python code behind it.