quantize images to custom palette

Roman Thilenius's icon

i need to quantize the colors in thousands of images to a user defined palette. (a different one for every picture)

in max this is quite easy to do.

but i would prefer a (partially automated) workflow within photoshop.

any idea how to do this best?

Marc Assenmacher's icon

I got questions:

i need to quantize the colors in thousands of images to a user defined palette. (a different one for every picture)

1 palette per picture, ok. How many colors does one palette need to have? 1, 2, 3, n?

partially automated) workflow within photoshop.

In Photoshop you can reduce an images to 1,2,3 main colors and use automation to open every picture, change settings and close is again.

But what kind of output do you need? A picture of the color palette oder a list with picture name and x color values? Or a PS color palette file?

Here are two tutorials for the start:

Roman Thilenius's icon

imagine an image with geometric figures which has compression artefacts and unsharp edges.

the user (my coworker) will create 1 palette from each input picture from this picture, and later apply it to the output picture in order to recreate the image in a more or less perfect version.

the palette can be in an extra image document or in a PS palette, and will consist of maybe 5 - 25 different colors.

for 1 or 2 of these color areas it might be required to compose them from 2 different color selections.

this is all doable by making selections from color areas and then compile a set of actions, but in practice this is too complicated to use and will be of no benefit over all-manual processes.

in max the select-and-split is easy, but then i cannot use PS filters in addition, which might be required. :)

bc in some cases preprocesses will be required to find the borders between colors in the input image using blur/sharpen/decrackle/younameit kind of stuff in order to differentiate colors from each other at their border.

photoshop will also allow quick interventions to change things in the original by will or bail out things which the automated, linear process of "split pink from light pink" (onto planes or documents or whatever) did not work as intended.

enough talking, feel free to experiment with this example.

colors where you think they look like the same will go into the palette, then the shapes have to be "redrawn", then a human will fill the new image with colors by painting it from the original (or eventually sighly different)

the mid part with the "shape" thing needs to be automated and made as effective as possible.

we´re using MacOS9 (as always), but your recommendations may include commercial PS plug-ins for ARM-mac or windows as well as funny workflows or apps other than PS and max.