05-18-2019, 11:46 AM
I do not remember whether this question was already discussed, hence I apologize in advance if so.
Assume an image has been "quantized" using mode indexed (then back to RGB).
The image shows -for example- areas of 8 different colors (if 8 was used while temporarily converting it to indexed).
But the number of separated color areas is often as expected greater than 8, because there are areas of the same color not contiguous, for example again we see 12 separated areas.
Interactively one may use the fuzzy select tool to work on each separated area, but from inside a script I don't see an easy way to do the same, because the gimp_image_select_color considers all together -as expected- the areas having the same colors, and the gimp_image_select_contiguous_color requires an x,y identifying a pixel position.
Is there a way to access separately each area without using a complex scan of pixels in the image to identify each of the 12 separated areas?
Many thanks.
Assume an image has been "quantized" using mode indexed (then back to RGB).
The image shows -for example- areas of 8 different colors (if 8 was used while temporarily converting it to indexed).
But the number of separated color areas is often as expected greater than 8, because there are areas of the same color not contiguous, for example again we see 12 separated areas.
Interactively one may use the fuzzy select tool to work on each separated area, but from inside a script I don't see an easy way to do the same, because the gimp_image_select_color considers all together -as expected- the areas having the same colors, and the gimp_image_select_contiguous_color requires an x,y identifying a pixel position.
Is there a way to access separately each area without using a complex scan of pixels in the image to identify each of the 12 separated areas?
Many thanks.