Gimp-Forum.net
Select region and bucket fill color - Printable Version

+- Gimp-Forum.net (https://www.gimp-forum.net)
+-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP)
+--- Forum: General questions (https://www.gimp-forum.net/Forum-General-questions)
+--- Thread: Select region and bucket fill color (/Thread-Select-region-and-bucket-fill-color)



Select region and bucket fill color - clayton@claytoncramer.com - 06-06-2025

ASs is usually the case, the tutorials for this are wonderful if you want to something hard.  But not for something that I suspect is very easy.  Attached is a seal off my now ancient briefcase from when I worked on the Mariner Jupiter/Saturn project, later renamed as Voyager.  The seal has been abused in many years of use and moving.  I want to make the background (black leather) transparent or perhaps white.  The blue of space behind the planets should be a uniform dark blue.  A few smudges need to be covered over with other patches of color.

How do I select a region (such as the black leather) and bucket fiill it with some arbitrary color.  I managed to select similar colors.  How do I tell bucket fill to use some arbitrary color?


RE: Select region and bucket fill color - Ofnuts - 06-07-2025

I'll suggest to kill two birds with one stone: 1) make the badge perfectly circular, and 2) get a selection on it:
  • Use the ellipse select tool to make a selection around the badge, with a fixed aspect ratio set to 1:1. No need to have a perfect fit (you can't anyway).
  • Once you have the selection, Select > To path, open the Paths list and make the Selection path visible by clicking where the eye icon should be.
  • You will end up with something like this:
[attachment=13593]
  • Remove the selection (Select > None) (you can restore it quickly from the path anyway if ever...)
  • You then use the perspective tool to make the badge fit better in the circle (make sure the Interpolation is set to NoHalo), and commit
[attachment=13594]
  • Your badge is now perfectly circular, and to get a selection on it you get it from the path (Select > From path), which, by design, is now the outline of your badge.
  • To make the rest of the image black you use Select > Invert and then bucket fill (with Fill whole selection). The bucket uses the foreground or background color.
  • You can also instead make the whole background transparent (Layer > Transparency > Add alpha channel) and then Edit > Clear or [delete].
[attachment=13595]

For extra points: I now notice that your badge is slightly rotated, so a quick fix would be rotate this result. However this will introduce a bit more blur (you already added some with the perspective) but you can fix the perspective and the rotation at the same time (and so add blur only once) by using the "Unified Transform" tool  instead of the plain Perspective tool above:

[attachment=13596]
[attachment=13597]

Just make sure you are using the Perspective handles in the corners (small squares) and not the Scale ones (large squares)



RE: Select region and bucket fill color - rich2005 - 06-07-2025

Just to add to Ofnuts comprehensive post, a little 3 minute video , not wonderful just an example

https://filedn.com/lkb9dw6mEfXSsOu9uKLaM14/badge.mp4

A png was quite large so a jpeg. 

[attachment=13599]