Re: [Gimp-developer] Polymorphic floodfill boundary test

On 22 March 2012 17:54, Torbjörn Rathsman <tormann telia com> wrote:
> I do not know how the floodfill decide if it comes to a boundary or not, but
> I guess that it always sampels information from the point where I clicked.
> However, sometimes another test would be more useful. This piece of code is
> polymorphic in boundary check:
> One way to implement FloodfillConditionBoundary besides the traditional one
> is to check the magnitude of the gradient vector at current pixel. This
> would be useful if one has a picture with a smooth gradient surrounded by a
> sharp edge and want to replace the smooth gradient with one solid color. If
> I want to add the feature myself, where do I start?

Clone the gimp git repo, find the code that does flood filling, modify
it to add your method and figure out how to add the option to the gui
and pass it down to that layer. Files that would be interesting

It's funny, I thought about this exact thing today.

Mikael Magnusson

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