: Gimp turn all contiguous colored regions into selections I have this image: I want to selectively fill in some of the contiguous white regions bounded by black lines. My plan for doing this
I have this image:
I want to selectively fill in some of the contiguous white regions bounded by black lines. My plan for doing this so far was to somehow turn the regions into selections then use the paint bucket to fill in regions. Stuck at first step. How can I do the first step or otherwise achieve the objective in GIMP?
More posts by @Ogunnowo857
2 Comments
Sorted by latest first Latest Oldest Best
Use the "Magic wand". Click in the first area, and shift click in addtional areas if needed. Bucket-fill with color.
Warning: If you only do this the result will look like crap, because the anti-aliasing pixels will be either removed (jaggy lines) or left out (white halo).
So, the proper way, a bit more complex:
Step 1: make the background transparent
Add an alpha channel if there is none: Layer>Transparency>Add alpha channel
Use the "By color selector" to select the white, with a small threshold
Select>Grow by 1 pixel (so that the selection includes the black lines)
Color>Color to alpha an remove the white
At that point you can add a new layer, filled with white, and drag it under the layer with the lines, and this should recreate the initial image.
Step2: painting areas (slow but very clean)
add a transparent layer, move it to between the layer with the lines and the white background (let's call it "Painted areas")
Select the "lines" layer in the Layers list (ctrl-L)
Use the Magic wand to select the areas to paint (use shift-click to add several areas if needed)
Select>Grow by one pixel (so the selection includes the black lines)
Select the "Painted areas" layer in the Layers list
Bucket-fill the selection ("Fill whole selection" option) with the required color.
Repeat for each color
Your layers list should look like this:
Step2: painting areas (faster but a bit less clean)
add a transparent layer, move it to between the layer with the lines and the white background
Set the bucket-fill tool to "Fill contiguous areas", "Sample merged", and a somewhat high threshold (around 100).
Set the color and click in the areas. The tough part if finding a threshold that includes all the edge pixels (no unpainted pixels) and that doesn't cross the lines and selects several adjacent areas.
(The Layers list is identical to the one above)
You don't need to make any selections to use the Paint Bucket tool. It has that functionality built in.
Open the image, and create a new transparent layer above.
Zoom in.
Select the Paint Bucket tool, and in the Tool Options, set the "sample merged" option, and set the threshold to about 115. If the threshold is too low, you'll get white pixels left where the black lines are anti-aliased.
Choose a foreground colour, and click where you want to fill.
The fill will be applied to the new transparent layer, leaving the original image layer untouched. The beauty of this method is if you mess up, you can just delete the layer, and do another one.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.