This is a very simple script for method of image processing othen used by myself - splitting picture into a two assembled layers: colors and grain. This gives us a very lot of capabilities of changing picture without making a hard artefacts inside it.
You can read more about the script, with a sample of use here:
p.s. i'm also add a second version - for a slow machines; it do same thing, but by the little diffrent way.