image-processinggimp

How to change background color to white in GIMP?


When I build model rockets, I always take a photo scan of the decals with my Canon multi-function printer/scanner. The decals usually have a light blue background. If I want to make a copy of those decals for a rebuilt model as it is common to lose a rocket in flight or have damage that requires a rebuild, I need to convert that light blue background to white because most printers do not print white. On a clear waterslide decal paper, printing white produces a clear background so that the decal can be put onto any color painted rocket. Original scan.

When I try to change the color of the light blue background using GIMP, the scans these days are so precise that the color isn't all the same. The light blue background can have dots that have a slightly different hue of light blue. When I use GIMP to bucket-fill the background, there are lots of dots that also need to be removed. An example is shown in the image. Is there a faster or more comprehensive way to change the light blue background color of a scanned decal to white in GIMP? Bucket-fill.


Solution

  • In such an image the Blue channel is close to maximum on the background (a blue tint is more a lack or red/green) and quite low in the red and black areas, so you can use it as a selection criterion with a large threshold and have a correct background selection:

    enter image description here

    You can have tiny un-selected "islands", that you can dissolve by using Select > Grow by a couple of pixels followed by Select > Shrink of the same amount. If you want to be picky you shrink by one less pixel to have the selection cover the edge pixels of the decals.

    You then bucket fill the selection with white.

    enter image description here