Change background and leave foreground
This discussion is connected to the gimp-user-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.
This is a read-only list on gimpusers.com so this discussion thread is read-only, too.
Change background and leave foreground | Francine Moore | 26 Oct 14:35 |
Change background and leave foreground | Alexandre Prokoudine | 26 Oct 15:10 |
Change background and leave foreground | Burnie West | 26 Oct 18:41 |
Change background and leave foreground | Burnie West | 26 Oct 18:57 |
Change background and leave foreground | Alexandre Prokoudine | 26 Oct 22:23 |
Change background and leave foreground | Steve Kinney | 26 Oct 19:23 |
Change background and leave foreground | Richard Gitschlag | 26 Oct 16:38 |
Change background and leave foreground
Hello,
I have been trying to change the background color of the photographs of jewelry I took. It is too grey, and I want to change it to white. Each time I try to do this, it changes the whole picture to white instead of just the background. Can someone tell me how I can keep the foreground without losing it, and change the background color.
Your assistance would be most appreciated.
Fran
Change background and leave foreground
Fran,
The general principle is:
1. Select objects with selection tools.
2. Cut and paste them to a new layer above the original layer (Ctrl+X,
Ctrl+Shift+V).
3. Change the background layer so that the object are unaffected.
There are many ways to select objects. I suggest you have a go at http://docs.gimp.org/2.8/en/gimp-tool-foreground-select.html.
Alexandre Prokoudine http://libregraphicsworld.org
On Fri, Oct 26, 2012 at 6:35 PM, Francine Moore wrote:
Hello,****
** **
I have been trying to change the background color of the photographs of jewelry I took. It is too grey, and I want to change it to white. Each time I try to do this, it changes the whole picture to white instead of just the background. Can someone tell me how I can keep the foreground without losing it, and change the background color.****
****
** **
** **
Your assistance would be most appreciated.****
** **
Fran****
_______________________________________________ gimp-user-list mailing list
gimp-user-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gimp-user-list
Change background and leave foreground
Alex pretty much nailed it. When GIMP looks at your image internally all it sees is one layer containing a bunch of RGB values -- it literally has no way to recognize which pixels are intended to be "foreground" and which ones are "background". It is, unfortunately, your job to make that distinction for GIMP and separate foreground from background, otherwise any attempt to adjust the image will (in fact it's required to) affect all pixels in the image layer. So you'll need to use and combine various selection tools to "draw a line" (almost literally) between foreground and background. Then you can perform operations on just one or the other.
Another alternative is, somewhat ironically, if can simply go back and take another photo of the same items set against a black surface instead of a white one - this will make it a lot easier to tell which is which. As it stands, if you used say a fuzzy select (which uses an automated edge-detection system) on the whole image then GIMP will actually clip off the tops of the jewelry because in that location the photo is slightly overexposed (all pixels fade out to solid white around the tops of the beads, there literally is no detail for the fuzzy selector to pick up) and GIMP can't tell where the top of the beads are. You'll probably have to mix in an elliptical select or two to make it clear.
So there's a variety of ways you can do it, but ultimately the responsibility for separating foreground and background is your job, not GIMP's, because only you really know which is which.
-- Stratadrake
strata_ranger@hotmail.com
--------------------
Numbers may not lie, but neither do they tell the whole truth.
From: moorhouse@shaw.ca
To: gimp-user-list@gnome.org
Date: Fri, 26 Oct 2012 07:35:03 -0700
Subject: [Gimp-user] Change background and leave foreground
Hello, I have been trying to change the background color of the photographs of jewelry I took. It is too grey, and I want to change it to white. Each time I try to do this, it changes the whole picture to white instead of just the background. Can someone tell me how I can keep the foreground without losing it, and change the background color. Your assistance would be most appreciated. Fran
gimp-user-list mailing list gimp-user-list@gnome.org https://mail.gnome.org/mailman/listinfo/gimp-user-list
Change background and leave foreground
On 10/26/2012 08:10 AM, Alexandre Prokoudine wrote:
Fran,
The general principle is:
1. Select objects with selection tools. 2. Cut and paste them to a new layer above the original layer (Ctrl+X, Ctrl+Shift+V).
This doesn't work for me - it creates a new image not a new layer.
I've had more success using the free select tool doing a piecewise-linear close boundary around the object(s).
I usually use antialiasing with feathered edges set at radius 2 pixels, trace around the foreground objects (at whatever level of magnification I find most convenient, using the sliders on the bottom and right to focus on where I am working, and then (Ctrl-x, Ctrl-V, Layer->new layer to keep the image properly placed within the background.
If the image is complex enough to break it in pieces to separate the background, then don't use antialiasing or there will be cut-line residues.
3. Change the background layer so that the object are unaffected.
There are many ways to select objects. I suggest you have a go at http://docs.gimp.org/2.8/en/gimp-tool-foreground-select.html.
This process is a new one for me - it seems at first try to take as much detailed attention and more work. I've also tried the scissors tool but it can't trace around edges as well as my hand-done piecewise linear feathered edges approach.
-- Burnie
Change background and leave foreground
On 10/26/2012 11:41 AM, Burnie West wrote:
On 10/26/2012 08:10 AM, Alexandre Prokoudine wrote:
Fran,
The general principle is:
1. Select objects with selection tools. 2. Cut and paste them to a new layer above the original layer (Ctrl+X, Ctrl+Shift+V).
This doesn't work for me - it creates a new image not a new layer.
I've had more success using the free select tool doing a piecewise-linear close boundary around the object(s).
I usually use antialiasing with feathered edges set at radius 2 pixels, trace around the foreground objects (at whatever level of magnification I find most convenient) using the sliders on the bottom and right to focus on where I am working, and then (Ctrl-x, Ctrl-V, Layer->New Layer) to keep the image properly placed within the background.
By the way, while you are making this piecewise linear selection, be very careful NOT to click in either of the rulers at the top or left of the image window (if they are displayed) because the selection you've already made will disappear and you'll have to start all over. This is a known bug.
If the image is complex enough to break it in pieces to separate the background, then don't use antialiasing or there will be cut-line residues.
3. Change the background layer so that the object are unaffected.
There are many ways to select objects. I suggest you have a go at http://docs.gimp.org/2.8/en/gimp-tool-foreground-select.html.
This process is a new one for me - it seems at first try to take as much detailed attention and more work. I've also tried the scissors tool but it can't trace around edges as well as my hand-done piecewise linear feathered edges approach.
-- Burnie
_______________________________________________ gimp-user-list mailing list
gimp-user-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gimp-user-list
Change background and leave foreground
On 10/26/2012 11:10 AM, Alexandre Prokoudine wrote:
Fran,
The general principle is:
1. Select objects with selection tools. 2. Cut and paste them to a new layer above the original layer (Ctrl+X, Ctrl+Shift+V).
3. Change the background layer so that the object are unaffected.There are many ways to select objects. I suggest you have a go at http://docs.gimp.org/2.8/en/gimp-tool-foreground-select.html.
This can also be done using layers and masks, which would be my preferred method - due to force of habit, and the low contrast in brightness and color between some parts of the foreground & background in the photo in question, making automated selection tools more difficult to use.
This is much easier than it sounds:
Open your image file in the GIMP, and find the Layers dialog in your dock area. Make a new layer, and fill it with the color, pattern, or etc. that you want for your background.
At the bottom of the Layers dialog, use the down-pointing arrow button to move your new layer below the layer with your original photo.
In the Layers dialog, right-click the layer thumbnail for your top layer (the original photo) to open a menu. Select "Add layer mask" from that menu, and accept the default "White" which will leave the photo layer fully visible. Left click on the new mask thumbnail (the one on the right) to make sure it's selected.
Then make sure your foreground color in the color selector is black, turn on the paintbrush tool, and in the main image window start painting around the outer edge of the items you want to keep in your photo layer. Everywhere you paint with black, your new background will show through.
If you accidentally wipe out part of your foreground object, just change your painting color to white and paint with that to bring the missing bits back. This is one big advantage of using layer masks, compared to working with pasted selections or deleting selected areas of a layer - you can adjust or undo details of your selection at any time.
Enlarge the image with the magnifying glass tool (or, better, hold down your ALT key and scroll your mouse wheel), for better accuracy. Also remember that you can paint a straight line by holding down the shift key and clicking your mouse - "connect the dots" saves a huge amount of time and stress.
Once the outline is done, use the "Magic Wand" tool to select the whole area outside where you were working. Do Select > Grow to make sure the edge of your outline is included in your selection area, then drag and drop black from the color selector to the image window to finish painting your mask in one step.
Save the file in .xcf format in case you want to work on it more later, save the file in the format you need to publish it, and yer done.
A variation: Instead of making a new layer and filling it with one color at the start, use the button to make a copy of your existing photo layer at the bottom of the Layers dialog. Then use the tool at Colors > Hue/Saturation to turn up the brightness of your background, ignoring what it does to the parts you don't want to change. The proceed exactly as above: Lower the altered layer, mask the original photo layer, and paint with black to make the altered background visible only where you want it. The end product might look a whole lot better.
:o)
Steve
Change background and leave foreground
On Fri, Oct 26, 2012 at 10:41 PM, Burnie West wrote:
2. Cut and paste them to a new layer above the original layer (Ctrl+X, Ctrl+Shift+V).
This doesn't work for me - it creates a new image not a new layer.
Oh snap, you are right. That would be Ctrl+V, Ctrl+Shift+N
Alexandre Prokoudine http://libregraphicsworld.org