APLawrence - Information and Resources for Unix and Linux Systems, Bloggers and the self-employed
RSS Feeds Get APLawrence.com by RSS














(OLDER) <- More Stuff -> (NEWER) (NEWEST)
Printer Friendly Version



The Gimp: Making Colors in a GIF Transparent

January 2004
By Crouse
USA Linux Users Group
Web Site: http://www.usalug.org



Sometimes when working with an image you want to make a certain color transparent. When working with a gif file this would make a round circle look round on any color background. This is actually very simple once you do it once. Finding the information for this took me a while so I thought I would pass it on to anyone that was interested.

1. Open your image in the gimp.

2. Right click the image and go to LAYERS then ADD ALPHA CHANNEL. You won't notice anything happening, but don't be concerned. It basically adds a transparent layer at the bottom of your image so when we erase the colors.....it's shows the transparent layer. Which of course would show whatever was under it on the screen.

3. Right click on the image again and go to SELECT and then down to BY COLOR. A window that is all black opens up. Don't change any of the settings....just use the defaults for now.

4. Now click on the color in the image you want to be transparent. These colors will now show up outlined.

5. Right click on the image again and go to EDIT and then down to CLEAR. This should now erase the outlined color you just picked from the image and the "transparent gimp checkerbox" should show through. This is the Gimps way of showing you that section is now transparent.

6. Right click on the image and choose SAVE AS and make sure to save as a GIF file if you want the transparency to work on the web.

Most of this information was gleaned from this webpage: http://courses.washington.edu/englhtml/engl481/usegimp.html and of course my Gimp Bible and my Essential Gimp books.

Editor's note: the Washington.edu link above has disappeared. This http://courses.washington.edu/hypertxt/engl282/usegimp.html works as of May 2008.

Another fun feature that can be used while using the SELECT and BY COLOR ..... instead of hitting CLEAR you can FILL W BG COLOR or the other one FILL W FG COLOR ........... this allows you to change the colors over the entire image instantly for the particular pixel color you choose to start with. Very fast and fun once you figure this out.


Technorati tags:


More Articles by Crouse




Hey thanksr for that. Aparently the delete key does not have the same effect as the clear command. as a matter of fact... none of the shortcut keys are working :p

Nilbus:
You rock! Thanks for writing this howto :D

CrouseGif:
Just the info I needed, Thanks. David

Gresh:
Couldn't get it to work.
It just filled with the background colour, black in my case.

Tich:
Very useful. I wish I'd read it sooner! Also useful is the Fuzzy Selection tool, which can select a single contiguous area of one color.

Hemo:
Thought this would work just great, until I got to Step #2 and find that the option to 'Add Alpha Channel' is grayed out and can't select it. I saved as a PNG, did not save background color, then re-opened the file and was able to follow these instructions.

Malikive:
Just followed these steps using GIMP2.0 on a PNG...worked great! Thanks!

Dwight:
Great page--just what I needed!



Indy:
Many, Many thanks, I looked long and hard and then found this, brilliant, to the point!

Min:
I already know how to do this, but the porblem is saving it.
It's in gif form, and in indexed mode. When i save it, it always filled the transparent part in with colour.

---July 19, 2004



---August 10, 2004

Thank you - don't have Paint Shop Pro, and couldn't work out how to do this until reading your page. Great!

---August 12, 2004

I can see the alpha "checker-box" but then after I save it as a GIF and look at it in a browser I can't see my drop shadow anymore... why won't this darn thing work!?!?!

---August 12, 2004
Because you had the dropshadow included in the alpha mask.

---September 10, 2004
Thanks a lot for this short and clean explaination :)


---September 22, 2004
Thanks for publishing this tip. This worked great for me after many frustating hours trying to get it working on my own. -- Ben



---September 23, 2004
Thanks! Saved me hours...


---October 2, 2004

Sarah: Thanxs So much! I've been so frustrated downloading different Programs and finally GIMP is the one I believe I'll stick with Thanxs so much for the How to! really needed that! Thanxs


---October 8, 2004

I'm not an experienced Gimp user but was able to help a college with this task. It took me 15 min to find your page and solve his prob. I should mention that I'm the only Linux-user at my company... Now, maby, they will get a hint why, he, he, he... THANX! /Wojtek J.

---October 8, 2004

What Bob said! Thanks for the post!
---October 21, 2004


---October 29, 2004

Thanks - I actually tried some stuff in the by color menue, but I couldn't figure out to click on the color on the image..
Somebody asked about the weird key for deleting:
I think it has something to do with the platform GIMP was designedn for first.

---November 15, 2004

Anon: instructions not clear enough and 'Add Alpha Channel" was ghosted out - pretty useless help page if you ask me

---November 22, 2004

"the gimp gif transparent" with google sent me here, very nice tip, thanks a lot !

---December 14, 2004

Small change for Gimp 2.0, should be:
2. Right click the image and go to LAYERS, then TRANSPARENCY and ALPHA TO SELECTION.
The remainder is still accurate. Cheers, Colin.

---December 18, 2004

I knew it could be done, but forgot how. Google brought me to your page. Thanks, your page has been bookmarked! -- Arnold

---December 23, 2004

woohoo yeah! thanks! this really helped ;)

---December 31, 2004

helped a lot! Merci.

---January 10, 2005

cenlatech:
first link in google to 'gimp transparency' and right on time, right on the money!!!

---January 24, 2005
thanks man, much appreciated



---January 25, 2005
Fantastic write-up! It helped me out quite a bit today on a web graphic. Thanks again! -- Paul



---January 27, 2005
Yet another thankful tip reader.

---January 29, 2005

Handy, Gimp Help Transparant in Firefox got me just what I wanted :)

---January 31, 2005


---February 1, 2005
Rock on the gimp. Instructions like this teach people 'how to fish'... Thanks for your efforts!





Wed Apr 6 06:49:20 2005: Subject:   anonymous


Very useful and well written. Great job!



Tue Apr 26 01:08:21 2005: Subject:   anonymous


Just a thanks ... it was my first transparent gif with The gimp (a newbie) after several years with Corel Paint ... and I wasn't able to discover it for my self!! Now I dont need to instal Corel Paint anymore !!



Thu Apr 28 16:58:57 2005: Subject: It works   anonymous



it works, cool







Fri May 6 09:01:28 2005: Subject: nice one   anonymous


:)



Fri Jun 10 15:54:41 2005: Subject:   anonymous


I had the same problem as others, after saving it was no longer transparent. I saved it as a PNG instead of GIF and deselected "Save background color" and it worked great.



Mon Jun 13 04:58:09 2005: Subject:   anonymous


Just what I was looking for (gimp + transparent in Google -> your page)
Thanks a lot !
Maestric



Wed Jun 22 18:29:35 2005: Subject: thanks   anonymous


Another happy reader. Thanks for this helpful document.






Fri Jun 24 10:28:13 2005: Subject: Thanks a lot   anonymous


Frustrated after trying to make a transparent gif from ms paint. installed gimp on windows and searched google which took me to your page. I wonder what would have I done without this info. Thanks a lot.




Thu Jul 14 08:53:03 2005: Subject:   anonymous


Thank you!!!!!!!!!!!!!
(from Italy)



Thu Jul 21 20:46:41 2005: Subject: transparancies and gimp   anonymous


amazing. such a simple concept, and it took me forever to figure it out. and even so, I didnt figure it out. I found you! thanks!



Tue Jul 26 19:00:19 2005: Subject: Dude, you rock   anonymous


I spent a half hour trying to find this in GIMP. So many options. :-) Thanks.



Tue Aug 30 16:15:45 2005: Subject: thanks a lot!   anonymous


i never would have figured that out on my own.

one caveat, though. on my version of gimp, the "add alpha channel" feature was hidden under a submenu called "transparency" instead of being in the "layers" menu.

layers -> transparency -> add alpha channel.




Wed Sep 14 23:57:41 2005: Subject: Thank you!   anonymous


This made may life so much easier and I've furled using http://www.furl.net so I have it for future reference. Thanks again!



Thu Sep 15 19:14:01 2005: Subject:   anonymous


i bookmarked this. there are some things graphic morons like me do once every 4 months, so why memorize all this? thank you!






Thu Sep 29 17:49:32 2005: Subject: Thanks!   anonymous


Thanks man!



Tue Oct 25 18:19:04 2005: Subject: thanks   Bill


Thanks! This is just what i needed.



Sat Dec 3 23:18:05 2005: Subject: thanks!   Brian


This is just what I was looking for!



Fri Jan 6 22:40:41 2006: Subject: A godsend!   anonymous


Great post. Was pulling my hair out before I Googled this blog. Thanks a ton!



Sat Jan 14 13:02:12 2006: Subject: thx   anonymous


Thanks man, that helped me a lot.



Sat Jan 14 16:46:46 2006: Subject: Thanks!   LiamMcDermott


Just wanted to say thanks for such a useful article. Thought I was bashing my head against a brick wall with this problem, until I found this blog!

Thank you!



Thu Mar 2 02:09:21 2006: Subject:   David


Thanks a lot man! you are a lifesaver. I spent almost 4 hours trying to make a transparent .gif without any luck, until I found this!






Tue Apr 4 11:23:18 2006: Subject: very nice!   James


Very nice little manual on how to do this simple task. I was stuck playing with the layers until I read your walk-thought. Great stuff!

Thanks a LOT!



Fri Apr 14 22:04:47 2006: Subject:   CarlfromPortlandOregon


Thank you very much for this tutorial. I found something by accident that might help others. If you didn't really set your picture up with a special color for the background and you find you now want to remove it, you can use the Magic Wand to select the color, but this tool has a great feature you might not know about. If you click on a color and then drag the mouse to the right or left, it will adjust the "Threshold" on the fly and show you a preview of what it will select when you let go of the mouse button. Actually up and down work as well for this. If you hold down the Shift key as you select the various colors you can very quickly get everything you want selected and the go through the Edit->Clear route, also using the other selection tools (while holding down shift) until you have exactly what you want to remove selected.



Tue May 2 04:35:53 2006: Subject:   anonymous


problem im having is that the image has a white background which im trying to make transparent (using it on a grey page) but the problem is when i do the above it actually removes the white from the actual image that should stay remaining... wonder if anyone knows how to get past this? im supposed to flatten the image first aren't i? hmm...stumped



Mon Jun 5 17:31:04 2006: Subject: Thank you!!   anonymous


Thank you!! I've been sitting here trying to figure this out ...



Fri Jun 30 20:17:18 2006: Subject:   anonymous


Thank you! This was exactly the information I needed, and it let me do in a couple of minutes what I would otherwise have wasted hours trying to do.



Wed Jul 12 21:35:55 2006: Subject:   anonymous


Thank you so much!



Sun Aug 27 05:21:11 2006: Subject: Transparent backgrounds in .gif files   Pat


Thank you so much for your concise guide to making transparent backgrounds in the GIMP! It helped make my astronomy web site look beautiful again.







Tue Sep 12 06:50:21 2006: Subject:   anonymous


augh!! you wouldn't know how to do it on ms paint by any chance?



Wed Sep 13 23:32:01 2006: Subject:   anonymous


Didn't work for me. First the alpha channel is under a different heading, second it was greyed out, third tried saving as a png without saving background color and it gave an error message and died.

Useless open-source crap basically, designed for tech-heads. Get a real program.



Wed Sep 13 23:37:49 2006: Subject:   anonymous


Try Microsoft's .NET Paint.

Or Microsoft's Photo Editor for that matter. Here's what you do -

Open the file.
Click 'tools'
Click 'set transparant color'
Click the color
Save.

But of course, that's Microsoft, so you'll hate it.

:o/





Thu Oct 5 14:16:12 2006: Subject:   anonymous


Thanks so much for the tip. It's concise and thorough instructions like this that are hard to find on the web. Thanks a million.



Mon Oct 16 00:28:21 2006: Subject: great tip.   anonymous


thx dude



Fri Nov 24 21:16:13 2006: Subject:   anonymous


Thanks Crouse,
Great (and simple) explanation on how to use the gimp features.




Wed Dec 6 20:59:04 2006: Subject: http://cyborgmoln.se   anonymous


Great! Just what I looked for to draw the next countdown days of my animated xmas candle.
I new transparency was simple, but this was the only easy-to-find place that provided a HOWTO.







Thu Dec 14 11:11:03 2006: Subject:   KesavanAthimoolam



- Create a new picture by File -> New option
- In the "Create a New Image" dialog, expand "Advanced options"
- Choose "Transparency" in the "Fill with" option

That's it! "



Fri Dec 15 02:40:42 2006: Subject: Thank you   anonymous


Bro, you just helped me out so much with your post! I've been trying forever to make an image transparent with no success. You made it real easy. Thanks a million!



Sat Dec 16 18:15:47 2006: Subject: http://volleychick.com   VolleyChick


Thank you, thank you, thank you! I have been trying for months to create transparent pngs for my store and gotten so frustrated I gave up. I found your site, downloaded Gimp and followed the tutorial. Giddyup - I just made my first one and it looks pretty good! Thanks again,

Di



Wed Feb 28 11:37:53 2007: Subject:   anonymous


Very useful, thanks.



Sat Mar 3 21:49:49 2007: Subject:   anonymous


Thanks for the help! :]



Wed Mar 28 08:05:14 2007: Subject:   anonymous


Thanks, this helped. All the best for what you do!



Sat May 5 20:04:38 2007: Subject:   James


Nicely done. Helpful and easy to follow.






Fri Jun 1 09:48:29 2007: Subject:   anonymous


Thx - worked like a dream - you can do virtually anything with the Gimp - problem is finding how to do it. following these instructions 2 minutes - job done. Last night, several hours of severe muttering.



Tue Jun 5 17:05:41 2007: Subject:   anonymous


Great article. Thank you so much.



Sat Jun 23 23:30:05 2007: Subject: How to enable transparancy   Donald


If you want to overlay a picture with some other picture or part of picture first of all make sure that the fileformat supports transparency. PNG cannot always. If you have a color index (palette) you need to EXPORT the picture as RGB-PNG, maybe some other format also will enable RGB. Then close, exit, reopen the file and make sure you get RGB channels and NOT INDEX!!!

To summarize: A layer which you want transparent need to have RGB-channels and then you can set the property to transparent and the display will show degrees of transparency.

I have plunged into this problem earlier but had forgot the solution. Therefore I repeat:

Make a new JPG from the PNG with color-index. Use "save-as". This is not easy to see from the Gimp documentation. PNG's with color-index do not support transparency, it is either-or. It is impossible to transform the "bad" PNG's to RGB-PNGs with "ImageMagick-convert" and other programs. You must go via JPG, even if Gimp documentation says that PNG can do everything.


Donald Axel http://d-axel.dk/pub/cmat/index.html http://www.d-axel.dk/cgi-bin/blox-dax.cgi




Sat Aug 25 03:11:40 2007: Subject:   anonymous


God bless you for putting this online



Wed Aug 29 01:57:39 2007: Subject:   anonymous


Note that this works when starting with an RGB image (a GIF is indexed). Check using the image -> mode menu and convert if necessary.

You save it as an indexed GIF at the end.




Mon Oct 1 02:10:56 2007: Subject:   anonymous


Thanks very much for this set of instructions, I've found them most helpful.



Thu Oct 11 13:55:16 2007: Subject:   AC


An excellent piece of advice - thanks very much!






Tue Oct 23 21:26:11 2007: Subject:   anonymous


This is very helpful -- and I did need this advice -- BUT if you're just trying to remove white from a photo, you would also remove the whites of the eyes - and possibly clothing or teeth.

If your photo has areas like the above then, after doing a 'color select', use the erase tool and 'erase' the color only from the highlighted areas that you don't need.

Of course, this is a no-brainer for a GIMP pro, unlike myself!





Tue Nov 20 18:29:29 2007: Subject:   anonymous


excellent - worked perfectly, thanks.



Wed Nov 28 05:08:35 2007: Subject:   anonymous


"Make a new JPG from the PNG with color-index. Use "save-as". This is not easy to see from the Gimp documentation. PNG's with color-index do not support transparency, it is either-or. It is impossible to transform the "bad" PNG's to RGB-PNGs with "ImageMagick-convert" and other programs. You must go via JPG, even if Gimp documentation says that PNG can do everything. "

I'd recommend going to a lossless format instead of JPG if what you say is actually correct, otherwise you're just going to introduce more distortion into your image.

Great tutorial. I've been fumbling around with how to do this for a long time, able to get it to work on some images but not others, and now I finally have a clue why!



Sun Dec 2 13:08:56 2007: Subject:   anonymous


Many thanks!!!



Thu Dec 27 07:09:58 2007: Subject:   anonymous


Thanks for the page



Mon Mar 31 13:13:13 2008: Subject: thanks   pow



easy and usefull! thanks!



Fri Apr 18 04:06:22 2008: Subject:   anonymous


thank very much - that helps me a lot :) thank you.




------------------------
Comments are closed for this page. If you have something very important to add, contact me by email or use the Google comments in the sidebar.



Auto FTP Manager

/Linux/crousegif.html copyright January 2004 Crouse All Rights Reserved

Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.

Publishing your articles here

Jump to Comments



Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. I also may own stock in companies mentioned here. If you have any question, please do feel free to contact me.

Specific links that take you to pages that allow you to purchase the item I reviewed are very likely to pay me a commission. Many of the books I review were given to me by the publishers specifically for the purpose of writing a review. These gifts and referral fees do not affect my opinions; I often give bad reviews anyway.

We use Google third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.


book graphic unix and linux troubleshooting guide

My Troubleshooting E-Book will show you how to solve tough problems on Linux and Unix systems!



 I sell and support
 Kerio Mail server






More:
       - Crouse
       - Linux
       - Unix
       - Web/HTML
       - GUI




Related Posts

Gimp Decorator

The Gimp

Using Open Source applications for web design

Grokking the Gimp



Unix/Linux Consultants

Skills Tests

Guest Post Here








card_image






My Favorites

Change Congress