Broken displaying of optimized PNG files

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

Moderators: XnTriq, helmut, xnview

Post Reply
Matrixik
Posts: 3
Joined: Thu Oct 04, 2012 10:54 am

Broken displaying of optimized PNG files

Post by Matrixik »

Hello,

I'm using great ScriptPNG ( http://css-ig.net/scriptpng.html ) to optimize PNG images. I found that after optimisation some images are displayed incorrectly in XnView. All of them are displayed OK in Irfan View, Firefox and IE.

Input image:
Image

Image optimised using [1] Fastest method:
Image
Image optimised using [9] Ultra (Brute) method:
Image

How they look in XnView 1.99.1:
Image

Same problem with:
Image
and optimised:
Image (black rectangle in XnView, OK in browser)

Can you help me with that?

Best regards
User avatar
xnview
Author of XnView
Posts: 43442
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Broken displaying of optimized PNG files

Post by xnview »

Could you send me some samples?
Pierre.
Matrixik
Posts: 3
Joined: Thu Oct 04, 2012 10:54 am

Re: Broken displaying of optimized PNG files

Post by Matrixik »

Right click on images I posted and "Save image as..."
or
https://dl.dropbox.com/u/933/Script/samples.zip

Best regards
User avatar
DOS386
Posts: 291
Joined: Sun Jun 11, 2006 2:43 pm

Re: Broken displaying of optimized Alphaized PNG files

Post by DOS386 »

YES I can confirm this :bug: ... examples do have Alpha (!!!) and show well in Opera, but are broken in XN 1.70.3 , 1.98.7 and 1.99.1.

Converting those PNG's into BMP with NC also produces garbage.

BTW, if I unoptimize them with PNGOUT /force and enable Alpha in XN, then they do show well.

Note that the Alpha support in PNG is somewhat flawed ("unpremultiplied") :shock:

WOW: http://x128.ho.ua/pngutils.html
There is indeed no WinZIP under my rock.
User avatar
xnview
Author of XnView
Posts: 43442
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Broken displaying of optimized PNG files

Post by xnview »

Ok, these images use alpha channel with 8bits pictures, XnView can't read them
Pierre.
Matrixik
Posts: 3
Joined: Thu Oct 04, 2012 10:54 am

Re: Broken displaying of optimized PNG files

Post by Matrixik »

And can it be fixed or is it not fixable for now?
User avatar
DOS386
Posts: 291
Joined: Sun Jun 11, 2006 2:43 pm

Re: Broken displaying of optimized PNG files

Post by DOS386 »

> Ok, these images use alpha channel with 8bits pictures, XnView can't read them

So it's a known issue (haven't we seen this already in the forum???) and NC/XN's PNG support is incomplete.

The largest PNG is "c6" RGBA (OK for NC/XN) while the 2 smaller are "c4" YA (bad luck for NC/XN).

> And can it be fixed or is it not fixable for now?

Sure it's fixable, the 2 problems:

- it needs work
- such "c4" YA PNG's are rare

The 3 options now are:

- fix it fully (consider that 99% of apps can do it right ...)
- discard the A channel (at least ... rather than outputting garbage)
- reject such PNG's ("sorry I don't support this type of PNG")

So this issue (<<PNG's with "c4" YA don't decode correctly>>) is IMHO a must-fix, besides <<8bppc->16bppc upgrade AKA Gamma-BUG>> t=20095 :-)
There is indeed no WinZIP under my rock.
MaxSt
Posts: 133
Joined: Fri Apr 10, 2009 9:55 pm

Re: Broken displaying of optimized PNG files

Post by MaxSt »

xnview wrote:Ok, these images use alpha channel with 8bits pictures, XnView can't read them
But the whole purpose of XnView is to read pictures!
Post Reply