Re: [Gimp-user] spread pixels colors at selection border



On 08/21/2013 02:54 PM, Kokopalen wrote:
El 21/08/2013 13:09, "pitibonom" <forums gimpusers com> escribió:
Hi :)

Does anyone know wether it's possible to spread the pixels colors
considering
the normal vector of the selection curve ?

Maybe you could implement a script to do the following:
- Border selection with a width of 1 pixel.
- Copy.
- Paste as new layer.
- Scale this new layer to be one pixel bigger.
- Paste as new layer, scale to be two pixels bigger.
- Paste as new layer, scale to be three pixels bigger.
- ... Repeat as many times as needed.
- Flatten the image or combine layers.

Not sure if that is something similar to what you want to do, but it would
be curious to see how it looks like :).


I would do it differently, using a path (which is very easily obtained from the selection):

- walk the path by fixed steps:
- at each step:
 -- sample the color on the path
-- compute the normal segment (with length=width) at the point a half-step before (which is the "after" of the previous step)
 -- compute the normal segment at the point a half-step after
 -- create a quadrangle path from these two segments
 -- create  a selection from that path
 -- bucket-fill with the color sampled above

Might be a bit slow :)







[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]