Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Graphics > GIMP (GNU Image Manipulation Program) > Re: backgrounds...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 5 of 8 Topic 2997 of 3157
Post > Topic >>

Re: backgrounds on png pix

by Ricky Rudolph <a@[EMAIL PROTECTED] > Jun 14, 2008 at 02:06 PM

Albretch Mueller wrote:
>  I am coding a tabbed window using java/swing
> 
>  Why is it that some png pictures somehow blend their backgrounds with
their
> surroundings' and some other don't?
> 
>  Take a look at both examples
> 
>  http://www.geocities.com/tekmonk2005/pix/example00_OK.jpg
> 
> 
http://www.geocities.com/tekmonk2005/pix/example02_BackGroundNotGood.jpg
> 
>  When users click on "Save" the entire background gets higlighted
(including
> the png pix' itslef), but when they click on "Q & Ans" the background of
> the picture itself doesn't.

PNG is a format that sup****ts transparency. In your examples, it seems 
that the hard drive icon has a transparent background (that is, the 
pixels surrounding the hard drive graphic are transparent). The light 
bulb icon doesn't seem to have the same transparent background.

>  How can you make it consistent like "Save"?

The best way to do it would be to get icon files that were created with 
transparent backgrounds. If such icon files are not available, you can 
try to edit existing icon images and turn their background transparent. 
If the icon images are antialiased, the resulting images may not be
perfect.

>  If you have, say, a jpeg pix and you converted to png using gimp. What
> property of "png" graphix should I look into as I ex****t the file?

Try the following steps and see if the result is good enough for your 
purpose.

1. Open the original icon image in GIMP

2. Use the Fuzzy Select Tool to create a selection of the background. 
Experiment with different threshold settings to obtain a selection that 
doesn't leave too much of an outline of the background color around the 
icon. (A threshold setting of 60 worked reasonably well in my 
experimentation.)

3. Give the selection feathered edges. (From the Select menu, select 
Feather... and set the desired thickness of the feathered edges. A value 
of 2 pixels worked reasonably well in my experimentation.)

4. Use the Color to Alpha function under the Colors menu to convert the 
background to transparent. The "From" color should be the background 
color to be removed.

5. Save the resulting image as a PNG file.

Good luck.
 




 8 Posts in Topic:
backgrounds on png pix
Albretch Mueller <lbrt  2008-06-14 09:00:57 
Re: backgrounds on png pix
Joshua Cranmer <Pidgeo  2008-06-14 13:32:30 
Re: backgrounds on png pix
Andrew Thompson <andre  2008-06-14 06:54:18 
Re: backgrounds on png pix
Ricky Rudolph <a@[EMAI  2008-06-14 14:09:18 
Re: backgrounds on png pix
Ricky Rudolph <a@[EMAI  2008-06-14 14:06:43 
Re: backgrounds on png pix
Donkey Hot <spam@[EMAI  2008-06-14 14:24:00 
Re: backgrounds on png pix
Roedy Green <see_websi  2008-06-16 11:43:11 
Re: backgrounds on png pix
"David A. Redick&quo  2008-06-16 11:58:52 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu Dec 4 17:17:47 CST 2008.