Issue with PNG/compose with alpha

Bugs found in XnView Classic. Please report only one bug per topic!

Moderators: helmut, XnTriq, xnview

User avatar
Posts: 884
Joined: Sun Apr 10, 2005 4:29 pm

Issue with PNG/compose with alpha

Post by Drahken »

I don't know if this is a bug, or if the option/setting is just counter-intuitive.
The problem is the "compose with alpha (32 bits)" setting in the read/write option panel for PNGs. One would expect this setting to make the alpha-transparent section of the image display as transparent (either not display at all, or display the grid pattern). However, when this setting is enabled, the transparent portions of the image are displayed as white. What is truly problematic though, is that the "view->use alpha channel" setting in the viewer is nonfunctional when the "compose with alpha" setting is enabled. The "use alpha channel" setting will either be checked or unchecked, depending on what you last set it to, but you can't change it & it behaves the same regardless whether it was previously checked or unchecked.
Now, if you go back into the options & uncheck the "compose with alpha" option, then the "use alpha channel" setting will be functional again. You can freely change it back & and forth, and when you do so it reacts as you would expect. (When enabled, transparent areas are displayed as the grid. When disabled, transparent areas are displayed as black).

One would expect the "compose with alpha" setting to automatically display alphatransparent PNGs with the transparent parts transparent & for the "use alpha channel" option to remain functional regardless of that setting. If this is the intended functionality, then there's a major bug.

It's possible though that the "compose with alpha" setting is intended to merge the alpha channel with the rest of the pic. If this is the case, then I think that fact needs clarified somehow. (Along with info on how viewing the alpha channel as some sort of merged image differes from simply ignoring the alpha channel altogether.)

Another, related, issue is that the "compose image with transparency" option in the read/write panel for PNGs does absolutely nothing at all, regardless whether the image has alpha transparency or is an 8-bit image. It also has no bearing on the above mentioned issue. (ie, The above issue is the same, regardless whether the "compose with transparency" setting is on or off.)

Here are a couple sample images;
Alpha transparency:
8-bit, with single color transparency:

I was using 1.98.2 when I first noticed these issues. I installed 1.98.5 & retested before posting this. The issues are exactly the same in both versions.
Oh the feuhrer, oh the feuhrer, oh the feuhrer's nipples bonk!