Post Reply 

PNG transparency issues

Mar 5, 2011, 18:24
Post: #1
PNG transparency issues
Are there different formats of transparency in a PNG image?

I've made a PNG image with transparency that looks fine (I see gray checkerboard through the image) when I close it and reopen it in GIMP. But in the Windows 7 picture viewer, all of the transparency looks opaque white. It is also opaque white when I load it into my Android app for use in OpenGL.

I've made PNG images with Inkscape, and they do not have this problem. The transparency looks correct in the Windows picture viewer, and in my Android app.
Find all posts by this user
Quote this message in a reply
Mar 5, 2011, 21:35
Post: #2
RE: PNG transparency issues
What do you mean by complete and partial transparency?

I haven't written the code that reads the file in. I'm using Android's provided Bitmap classes to load the file into memory, so I don't know any of the details about how it works.

I attached some examples.

trees.png has the problem, image2993.png doesn't.

Attached File(s) Thumbnail(s)
Find all posts by this user
Quote this message in a reply
Mar 6, 2011, 22:51
Post: #3
RE: PNG transparency issues
Bizarre! I'll have to dive deeper into this later. For now, I'm getting by with using Inkscape to create my PNGs.
Find all posts by this user
Quote this message in a reply
May 15, 2011, 21:43 (This post was last modified: May 15, 2011 21:45 by
Post: #4
RE: PNG transparency issues
(Mar 5, 2011 23:02)ofnuts Wrote:  Strange, because I see exactly the opposite on my Linux. Trees.jpg is OK and displays the same in every transparency-aware software (ie, black frame with the trees at the bottom, and transparent center). And I tried a lot of Linux software, plus some on XP...

On the other hand, image2993 displays everywhere as a light blue square on black, althout I had once a glimpse of a light blue square, a black square and two squiggles, but I can't reproduce it. Futhermore, unlike tree.png, Gmp loads it without a transparency channel.

The jpeg image format does not support transparency on any platform.

Transparency sounds like the inverse of opacity but what is ment by it in graphics is a bit more complicated.

Opacity usually applies to the image as a whole by a program that combines the image with other graphics in a process called compositing. Opacity usually refers to a property extrinsic to the image format. For example opacity can be used in CSS when making web pages:

Transparency on the other hand allows a variation of the transparency pixel by pixel and is intrinsic to the image format. For an image itself to be transparent, the image format must support an alpha channel or bit mask layer. Image Transparency is applied in conjunction with opacity.

Even though this information is as part of the image as the colors of the pixel it can be ignored by software. For example IE was quite slow to implement PNG transparency. I believe PNG works in IE, I think v8 had PNG transparency support.

PNG is an open standards format. GIF was a proprietary format that is being phased out.
Animation, another feature of GIF is improved in it's PNG implementation.
GIF is encumbered by a patient by Unisys on LZW compression employed in the format.

According to my memory and understanding, years after GIF was very widely in use the LZW patent holder sued the largest companies for royalties and made licensing arrangements available consider legally to be RAND ("reasonable and non-discriminatory") term that would allow others to avoid a suit if they pony up.

It has been strongly argued that RAND terms are insufficient for open web standards and this is the prevailing policy on the net.

PNG uses the same compression as gzip. There is no foreseeable patent that could be enforced on PNG. There was some buzz about a compositing patent but on analysis those fears have been laid to rest.
Find all posts by this user
Quote this message in a reply
May 15, 2011, 22:03
Post: #5
RE: PNG transparency issues
Welcome to GIMP Forums, and for all the info
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  exporting png to PDF problem switched 1 236 Sep 20, 2018 09:31
Last Post: switched
  (Probably)easy transparency / background question Matthew Cole 1 325 Mar 13, 2018 18:26
Last Post: ythgilb
  compressed .gif issues Kairu 1 295 Jan 2, 2018 09:20
Last Post: paynekj
  Checkerboard transparency toggle rahdad1 2 499 Oct 9, 2014 16:14
Last Post: rahdad1
  Transparency zead 3 572 Aug 16, 2014 11:13
Last Post: zead

Forum Jump:

GIMP ForumPortalArchiveContactTermsRSS