Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
product white blends into background white
#1
Hello. I wanted to put a white background to this photograph (the first photo, original). But when I modify the levels to make the background completely white, I find that the white of the product itself blends into the background since the white of the product is even whiter than the background (second photo, modified). is there any way to fix this?
Best regards.


Attached Files Image(s)
       
Reply
#2
You need to separate the foreground (the box) from the gradient background.

Various ways to do that. Try the foreground select tool. https://docs.gimp.org/en/gimp-tool-foreg...elect.html

Use the FG select tool. Invert the selection, fill with white.  Kill the selection. If needed, adjust the result, with the curves tool.

One minute example: https://i.imgur.com/hjvq6so.mp4

Depending on destination ( is it a product icon ?) try and find a better original image.
Reply
#3
perfect! Thank you very much.
Reply
#4
You could trace with free select.  That is not a difficult trace.  Invert the selection and then use levels or bucket fill on the background.

This was done with free select and then levels.  A second trace of the edge of the box was done and then some Gaussian Blur to soften the join.  I could have made the background completely white with bucket fill.

   
Reply
#5
(09-23-2022, 05:23 PM)rich2005 Wrote: You need to separate the foreground (the box) from the gradient background.

Various ways to do that. Try the foreground select tool. https://docs.gimp.org/en/gimp-tool-foreg...elect.html

Use the FG  select tool. Invert the selection, fill with white.  Kill the selection. If needed, adjust the result, with the curves tool.

One minute example:  https://i.imgur.com/hjvq6so.mp4

Depending on destination ( is it a product icon ?) try and find a better original image.

It's not perfect. Look at the photo. is there a way to select the background instead of the foreground? But in the same way that you proceed to select the product with the selection tool in the foreground. I say this because the foreground has many colors to select but the background has few and a more defined silhouette still comes out.


Attached Files Image(s)
   
Reply
#6
Draw a path all around the box the 'Path Tool' (straight lines). 
- Select / Select from Path
- Select / Invert
- Select / Shrink (1 or 2 pixels)
- Select / Feather (2 or 3 pixels)
- delete the selection 
You can straighten the box with one of the 'Tools / Tranform Tools'
Optimise with 'Filters / Enhance / Sharpen'  
   
Reply
#7
Quote:It's not perfect. Look at the photo. is there a way to select the background instead of the foreground?

It is not perfect because the image is less than wonderful, small, blurred, lacking in definition.

Any selection can be reversed, Select -> Invert it does not matter if FG / BG is selected.

Quote:. I say this because the foreground has many colors to select but the background has few and a more defined silhouette still comes out.

Less colours but still plenty, 490, that is why a colour select only partially works. 

   

The adjustment for that is the threshold setting but then most of the FG is selected as well.

I did say various ways, As zeuspaul wrote, trace around the edges with the free select tool. Another way is trace around the outline with a path, then convert the path into a selection. Can take less than a minute for an image like yours.

Both of those in the attached Gimp file. Have a look to see how easy it is. Find the selection in the channels dock.

One final way (from me) you can paint out either a FG or a BG using a layer mask. Up to you how good it is at following the edge.

https://i.imgur.com/Y3QHbWg.mp4

I have seen this sort of problem before. Do you have hundreds of these to do? No easy way Wink


Attached Files
.gz   original.xcf.gz (Size: 198.76 KB / Downloads: 53)
Reply
#8
ok, thanks, with the free selection it works for me.
Reply


Forum Jump: