Page 1 of 1

Broken displaying of optimized PNG files

Posted: Thu Oct 04, 2012 11:17 am
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

Re: Broken displaying of optimized PNG files

Posted: Thu Oct 04, 2012 12:56 pm
by xnview
Could you send me some samples?

Re: Broken displaying of optimized PNG files

Posted: Fri Oct 05, 2012 9:12 am
by Matrixik
Right click on images I posted and "Save image as..."
or
https://dl.dropbox.com/u/933/Script/samples.zip

Best regards

Re: Broken displaying of optimized Alphaized PNG files

Posted: Mon Oct 08, 2012 6:18 am
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

Re: Broken displaying of optimized PNG files

Posted: Mon Oct 08, 2012 7:46 am
by xnview
Ok, these images use alpha channel with 8bits pictures, XnView can't read them

Re: Broken displaying of optimized PNG files

Posted: Mon Oct 08, 2012 12:33 pm
by Matrixik
And can it be fixed or is it not fixable for now?

Re: Broken displaying of optimized PNG files

Posted: Mon Oct 08, 2012 6:06 pm
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 :-)

Re: Broken displaying of optimized PNG files

Posted: Tue Oct 09, 2012 3:31 pm
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!