[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Google
  Web www.spinics.net

Re: Polymorphic floodfill boundary test



On 22 March 2012 17:54, Torbjörn Rathsman <tormann@xxxxxxxxx> 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
include,
app/tools/gimpbucketfilltool.c
app/core/gimpimage-contiguous-region.c
app/core/gimpdrawable-bucket-fill.c

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

-- 
Mikael Magnusson
_______________________________________________
gimp-developer-list mailing list
gimp-developer-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gimp-developer-list



[Home]     [Video For Linux]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Yosemite Book Store]     [gtk]     [GIMP for Windows]     [KDE]     [Scanner]     [Memory]     [GEGL]     [Gimp's Home]     [Gimp on Windows]     [Steve's Art]     [Webcams]

  Powered by Linux