It is currently Wed Sep 16, 2026 5:32 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 13 posts ] 
Author Message
 Post subject: How to replace a background of a header image (for eagertolearn).
PostPosted: Thu Sep 10, 2015 8:29 pm  (#1) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4554
Location: Canada
Open your image that you want to replace the background of header text in GIMP.
1. Use "Rectangle Select Tool" to Select the area to be replace color with. (On windows you can hold Ctrl key and scroll mouse button to zoom in or out, and adjust the rectangle to select an accurate rectangle)
Image
2. Ctrl-C to Copy (or menu item Edit/Copy). Ctrl-V to Paste (or menu item Edit/Paste Into). You'll have a Floating Selection on top of your original layer (like below).
Image
3. Right click the Floating Selection and select "To New Layer". This will put your copied area into a new layer above the original background.
Image
4. Use "Select By Color Tool" and click on the White part of the Header text to select all that white in that layer.
Image
5. Ctrl-I to Invert Selection (or menu item Select/Invert). This will select anything that isn't the White previously selected in that layer.
Image
6. Click on the Foreground Color to change it to any color you like to replace the grey/black header background with. (here i am just selecting red).
Image
7. Click and drag the Foreground Color into your working area. This will cover the selected area with red.
Image
8. It's done, now we just have to merge visible layers. Right click on any layer in the Layers Window, and select "Merge Visible Layers..." then click "Merge" when the window pops up.
Image
9. menu item Select/None to see the image without the selection moving ants.
Image
10. Now you can Export to save your new image.

PS: If you wanted to play with Text Tool, you can select the Big Capital A icon in Tools, then drag and select an area on your working area to add text to, and start typing away, and play around with text options.

_________________
Image
Visualize your and others dreams coming true.


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: How to replace a background of a header image (for eagertolearn).
PostPosted: Fri Sep 11, 2015 2:30 am  (#2) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4812
This method creates pixellated text.... For good results, once copied to a new layer:

1) use Color-to-alpha to remove the background (or repaint the background in "Color erase" mode)
2) lock the alpha channel and bucket fill with the new color
3) if a background color is necessary, unlock alpha channel, set bucket-fill to "Behind" mode and bucket fill with required background color.

_________________
Image


Top
 Post subject: Re: How to replace a background of a header image (for eagertolearn).
PostPosted: Fri Sep 11, 2015 2:54 am  (#3) 
Offline
Administrator
User avatar

Joined: Aug 10, 2012
Posts: 14204
Location: Native to NYC living in Arizona, Gimp 2.8 - 3.0, Win 11 PC.
ofnuts wrote:
This method creates pixellated text.... For good results, once copied to a new layer:

1) use Color-to-alpha to remove the background (or repaint the background in "Color erase" mode)
2) lock the alpha channel and bucket fill with the new color
3) if a background color is necessary, unlock alpha channel, set bucket-fill to "Behind" mode and bucket fill with required background color.

I agree with Ofnuts and I also think that a layer mask could also be successfully implemented to remove the background.

_________________
Image
"A wise man learns more from a foolish question than a fool can learn from a wise answer"
Image


Top
 Post subject: Re: How to replace a background of a header image (for eagertolearn).
PostPosted: Fri Sep 11, 2015 10:28 am  (#4) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4554
Location: Canada
cool skillz ofnuts.
but i was wondering if this pixelized gray scale background stops me from performing those steps...
Image
I could only get it to partially fill a color and not a pure color.

_________________
Image
Visualize your and others dreams coming true.


Top
 Post subject: Re: How to replace a background of a header image (for eagertolearn).
PostPosted: Fri Sep 11, 2015 10:31 am  (#5) 
Offline
GimpChat Member
User avatar

Joined: Apr 08, 2010
Posts: 5420
Location: Northwest Ohio
I have never quite understood how and when to use the lock alpha channel. Can someone give a brief explanation for this somewhat computer illiterate gimp user?


Top
 Post subject: Re: How to replace a background of a header image (for eagertolearn).
PostPosted: Fri Sep 11, 2015 10:46 am  (#6) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4554
Location: Canada
2-ton wrote:
I have never quite understood how and when to use the lock alpha channel. Can someone give a brief explanation for this somewhat computer illiterate gimp user?

I think it locks the transparency so you can't change it..that way you can paint or whatever and the transparency stays the same.
Like if a pixel is transparent it stays transparent, if a pixel is 50% transparent it stays 50% transparent.

_________________
Image
Visualize your and others dreams coming true.


Top
 Post subject: Re: How to replace a background of a header image (for eagertolearn).
PostPosted: Fri Sep 11, 2015 11:00 am  (#7) 
Offline
GimpChat Member
User avatar

Joined: Aug 16, 2012
Posts: 4271
Location: Göteborg, Sweden
eagertolearn: you're getting lots of good tips here - all of them useful to know, but not all of them equally easy to apply on this particular image. for example, trandoductin's method is good if you're in a hurry and don't want to be too fussy about the result, but it does give pixellated text, just as ofnuts says. ofnut's method is in my opinion more elegant but not as easy to use for a beginner - colour to alpha removes the target colour wherever it shows up, so if you for example have a very pixellated white text with lots of grey spots in it and you have a grey background you want to remove, you will get lots of little holes in the white text where the grey spots used to be. if you make a red background that will look awful. i agree with wallace that a layer mask would be a good solution for this, at lest if the image is highly contrasted. the example image trandoductin posted would be ideal for this. you'd just add a layermask and in the dialogue box choose "greyscale copy of layer". then you could edit the layer mask using curves or brightness and contrast until you got rid of the background. that would give you a chance to change colour of just the text if you wanted. if you invert colours of the layer mask you will get just the background, and that in turn will give you a chance to change colours of just the background.

_________________


Top
 Post subject: Re: How to replace a background of a header image (for eagertolearn).
PostPosted: Fri Sep 11, 2015 12:22 pm  (#8) 
Offline
Administrator
User avatar

Joined: Aug 10, 2012
Posts: 14204
Location: Native to NYC living in Arizona, Gimp 2.8 - 3.0, Win 11 PC.
I this case and the given image. I would just create new text with whatever color backdrop I wanted.

_________________
Image
"A wise man learns more from a foolish question than a fool can learn from a wise answer"
Image


Top
 Post subject: Re: How to replace a background of a header image (for eagertolearn).
PostPosted: Fri Sep 11, 2015 1:03 pm  (#9) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4554
Location: Canada
Or after color picking white, change Selection To Path, the path to selection, drag white into working area.
Ctrl-I, drag whatever background color into working area.

By turning to Selection to Path and then Path to Selection, you get a non pixelized effect.

_________________
Image
Visualize your and others dreams coming true.


Top
 Post subject: Re: How to replace a background of a header image (for eagertolearn).
PostPosted: Fri Sep 11, 2015 2:44 pm  (#10) 
Offline
Administrator
User avatar

Joined: Aug 10, 2012
Posts: 14204
Location: Native to NYC living in Arizona, Gimp 2.8 - 3.0, Win 11 PC.
trandoductin wrote:
Or after color picking white, change Selection To Path, the path to selection, drag white into working area.
Ctrl-I, drag whatever background color into working area.

By turning to Selection to Path and then Path to Selection, you get a non pixelized effect.

That's a good idea.
You can even adjust the path or remove whatever nodes doesn't look quite right.

Still, with a text editor available, it would be just as easy to create new text.
If it's a matter of matching the font. You can always do a font search for a similar font.

_________________
Image
"A wise man learns more from a foolish question than a fool can learn from a wise answer"
Image


Top
 Post subject: Re: How to replace a background of a header image (for eagertolearn).
PostPosted: Fri Sep 11, 2015 3:09 pm  (#11) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4812
trandoductin wrote:
cool skillz ofnuts.
but i was wondering if this pixelized gray scale background stops me from performing those steps...
[ Image ]
I could only get it to partially fill a color and not a pure color.

With a grainy background like this, and if the header is text or simple graphics, use the path tool to create an outline of the text, and then use it to bucket-fill.

_________________
Image


Top
 Post subject: Re: How to replace a background of a header image (for eagertolearn).
PostPosted: Fri Sep 11, 2015 3:20 pm  (#12) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4812
2-ton wrote:
I have never quite understood how and when to use the lock alpha channel. Can someone give a brief explanation for this somewhat computer illiterate gimp user?

A pixel is determined by four values, RGBA, the three color channel and the opacity (A). When you lock the alpha channel, whatever you do only affects RGB, the "A" component of your alteration is ignored.

Typical use: in text and graphics, in a transparent layer, smooth edges are obtained by using partially transparent pixels. If you lock the alpha channel, these partially transparent pixels keep their opacity, and you get the same blend to the background with the new color, and so keep the same smooth edges. It would be completely equivalent to use alpha-to-selection, add a new layer, and bucket-fill the selection. But it wouldn't be the same to use alpha-to-selection and bucket-fill the original layer, because in that case the partial selection on the edge pixels would cause the new color to be mixed with the old...

_________________
Image


Top
 Post subject: Re: How to replace a background of a header image (for eagertolearn).
PostPosted: Fri Sep 11, 2015 8:29 pm  (#13) 
Offline
GimpChat Member
User avatar

Joined: Apr 08, 2010
Posts: 5420
Location: Northwest Ohio
Thanks for the information on the alpha lock.


Top
Post new topic Reply to topic  [ 13 posts ] 

All times are UTC - 5 hours [ DST ]



* Login  



Powered by phpBB3 © phpBB Group