The World’s Leading Microsoft .NET Magazine
   
 
timstall

Donate Today!

Search Box

 

Calendar

««Sep 2008»»
SMTWTFS
 
1
2
3
456
78910111213
14151617181920
21222324252627
282930

My RSS Feeds








Mailing List

Most Popular Tags

                                                           

Making a transparent Gif with the free Paint.Net

posted Monday, 21 May 2007

Sometimes a developer will need to make a transparent GIF, such as for a web page. This should be trivial - you essentially want to say "make every pixel that is color X be transparent", but most standard development tools (VS, Paint, etc...) don't let you do this. While there are lots of expensive graphics programs out there, most developers don't have these.

An easy way to make a transparent gif is using the free Paint.Net (written entirely in .Net).

  1. Download Paint.Net. It's a pretty good, free, graphics editing tool.
  2. Open up your image. Save it as a gif.
  3. In the Tool section, use the "Magic Wand" feature.
  4. Set it's tolerance to '0%'
  5. Drag it over the section you want to make transparent. The magic wand catches an entire region of adjacent, same-color-range, pixels
  6. Once the region is selected, then hit the delete key. [Updated 12/11/2007]

I find this convenient for simple web imaging needs. Also, Paint.Net has a ton of other features, like gradients, blends, and special effects.

 


Living in Chicago and interested in working for a great company? Check out the careers at Paylocity.

tags:    

links: digg this    technorati    




1. picasso left...
Tuesday, 11 December 2007 12:43 am

Isn't there a step 6? I've got all the pixels selected, but then what?


2. Tim Stall left...
Tuesday, 11 December 2007 8:47 am

Oops, yes. Step 6: Once the region is selected, then hit the delete key.


3. Sultan left...
Wednesday, 16 January 2008 2:11 pm

Thanks! I have to make temporary icons and toolbar buttons (which are subsequently replaced by our marketing team with professional ones) and I hate using Windows Paint precisely because I can't make the "background" transparent. I'll never be without Paint.NET from now on :)