Need help to spread

Hi everyone.

I need urgent help on my patch please.

Here is what I need : a pixelisation effect of a jpg texture but with this behaviour : the shown pixel color must not be an average of around pixels colors (like it usualy is) but it must be the color that is used the most times.

I already made a patch to do that (attached) but I can only get what I want with ONE pixel only.

Please help me to spread this patch to an array of about 35x35 pixels.

Or if you think that my patch is really not optinized (it might be since Im a beginner) please guide me on an other way to achieve what I need.

I can’t wait for your answers.

Regards. (53.9 kB)

I still could not find any answer to this in v4.