Re: [Gimp-developer] How to get a region of connected pixels?

On Thu, Jul 26, 2012 at 1:50 PM, Astaroth Calibur wrote:
> For that purpose, I think I need to get a region of connected pixels using
> flood-fill algorithm. Anyway, I hope there is/are API function(s) which can
> simplify my work. Any of you guys would give me a worthy direction, advice,
> or whatever?
> Thanks in advance.


DRAWABLE	drawable	The affected drawable
FLOAT	x	x coordinate of initial seed fill point: (image coordinates)
FLOAT	y	y coordinate of initial seed fill point: (image coordinates)
INT32	threshold	Threshold in intensity levels 0 <= threshold <= 255
INT32	operation	The selection operation: { ADD (0), SUB (1), REPLACE
(2), INTERSECT (3) }
INT32	antialias	Antialiasing (TRUE or FALSE)
INT32	feather	Feather option for selections
FLOAT	feather_radius	Radius for feather operation
INT32	sample_merged	Use the composite image, not the drawable
Returns: nothing

This tool creates a fuzzy selection over the specified image. A fuzzy
selection is determined by a seed fill under the constraints of the
specified threshold. Essentially, the color at the specified
coordinates (in the drawable) is measured and the selection expands
outwards from that point to any adjacent pixels which are not
significantly different (as determined by the threshold value). This
process continues until no more expansion is possible. The
antialiasing parameter allows the final selection mask to contain
intermediate values based on close misses to the threshold bar at
pixels along the seed fill boundary. Feathering can be enabled
optionally and is controlled with the "feather_radius" paramter. If
the sample_merged parameter is non-zero, the data of the composite
image will be used instead of that for the specified drawable. This is
equivalent to sampling for colors after merging all visible layers. In
the case of a merged sampling, the supplied drawable is ignored.If the
sample is merged, the specified coordinates are relative to the image
origin; otherwise, they are relative to the drawable's origin.

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