backgrounds on png pix
  Home FAQ Contact Sign in
comp.graphics.apps.gimp only
 
Advanced search
POPULAR GROUPS

more...

comp.graphics.apps.gimp Profile…
 Up
backgrounds on png pix         


Author: Albretch Mueller
Date: Jun 14, 2008 06:00

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.

How can you make it consistent like "Save"?

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 export the file?

Thanks
lbrtchx
7 Comments
Re: backgrounds on png pix         


Author: Joshua Cranmer
Date: Jun 14, 2008 06:32

Albretch Mueller wrote:
> Why is it that some png pictures somehow blend their backgrounds with their
> surroundings' and some other don't?

Transparency, controlled by what can be termed "opacity" or the "alpha
channel."
> 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 export the file?

I haven't used gimp in a while, but I believe the feature is named
"Color to Alpha" or something like that; you have to make the pixels
transparent before exporting.

P.S. It's graphics, not "graphix"

--
Beware of bugs in the above code; I have only proved it correct, not
tried it. -- Donald E. Knuth
no comments
Re: backgrounds on png pix         


Author: Andrew Thompson
Date: Jun 14, 2008 06:54

On Jun 14, 11:00 pm, Albretch Mueller gmail.com> wrote:
...
>  If you have, say, a jpeg pix ...

JPEG is an extremely poor format for storing
simple images with few colors. As an example,
that 'light bulb' icon seems to originate from
a concept that only involved 16-32 colors, yet
the actual area of the screenshot it occupies
now contains 1023 colors.
>..and you converted to png using gimp. What
> property of "png" graphix should I look into as I export the file?

The transparency value of the colors. It is
tricky though, when you might have 22 slight
variants of 'off-white'. Also, that icon was
meant to show partially transparent 'effects'
around the exterior dots. Those pixels need to
be made partially transparent as well, in order
to get the right effect with a different background.
Show full article (0.93Kb)
no comments
Re: backgrounds on png pix         


Date: Jun 14, 2008 07:06

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 supports 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.
Show full article (2.17Kb)
no comments
Re: backgrounds on png pix         


Date: Jun 14, 2008 07:09

Andrew Thompson wrote:
> The transparency value of the colors. It is
> tricky though, when you might have 22 slight
> variants of 'off-white'. Also, that icon was
> meant to show partially transparent 'effects'
> around the exterior dots. Those pixels need to
> be made partially transparent as well, in order
> to get the right effect with a different background.
>
> How you would achieve all that in gimp (or any way
> other than editing by hand), I do not know.

Color to Alpha, under the Colors menu.
no comments
Re: backgrounds on png pix         


Author: Donkey Hot
Date: Jun 14, 2008 07:24

Albretch Mueller gmail.com> wrote in
news:1213448457.773063@nntp.acecape.com:
Show full article (0.96Kb)
no comments
Re: backgrounds on png pix         


Author: Roedy Green
Date: Jun 16, 2008 04:43

On Sat, 14 Jun 2008 09:00:57 -0400, Albretch Mueller
gmail.com> wrote, quoted or indirectly quoted someone who
said :
> Why is it that some png pictures somehow blend their backgrounds with their
>surroundings' and some other don't?

try a modern browser like Firefox or Opera. I suspect you will see
the problem only on IE which still has bugs in its PNG rendering.

See http://mindprod.com/applet/masker.html
for a description of the problem as the "doctoring" kludge to make PNG
images work on IE.
--

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
no comments
Re: backgrounds on png pix         


Author: David A. Redick
Date: Jun 16, 2008 11:58

Check the alpha channel for those odd PNGs.
JPEG doesn't support alpha so when those images were converted it
probably defaulted to 0xff (full alpha or full opacity).

In Paint.Net (probably Gimp too) just select the area you want
transparent and hit delete.
It should become a gray and white checker board pattern (de facto for
invisible stuff)

Futher reading:

http://en.wikipedia.org/wiki/RGBA_color_space
http://en.wikipedia.org/wiki/Alpha_compositing
no comments