Page 1 of 2

PNGout

Posted: Wed Sep 19, 2007 7:35 am
by xnview
I would like to know if a PNGout plugin would be a good thing?

Posted: Wed Sep 19, 2007 9:40 am
by ckit
I don't see why it wouldn't be a good addition to XnView, please add it :)

Posted: Wed Sep 19, 2007 5:26 pm
by Guest
Sounds really good, I already use PNGout in Infranview.

Posted: Wed Sep 19, 2007 9:45 pm
by XnTriq
A PNGOut plug-in would make for a very happy XnTriq! Image
Drahken ([url=http://newsgroup.xnview.com/viewtopic.php?p=18979#18979]Paste Clipboard, pngout support[/url]) wrote:- PNGOUT (http://advsys.net/ken/utils.htm) plugin support for optimizing PNG files in Save As.
I requested this feature a while back: http://newsgroup.xnview.com/viewtopic.php?t=2063 I also approached the author of pngout about making a version for xnview. He agreed, but said he was busy and it would take a while to get around to it.

Re: PNGout

Posted: Fri Sep 21, 2007 3:42 pm
by xnview
Ok, here is a first version of PNGout plugin

http://www.xnview.com/download/addons/PNGout.zip

Debug Dos-box

Posted: Fri Sep 21, 2007 4:27 pm
by Clo
:arrow: Pierre

:) Hello !

• Seems to work at first glance, thanks !

• However, you forgot to remove the (debugging ?) DOS-box…
- I miss a small LNG file to translate…

:mrgreen: KR
Claude
Clo

Posted: Fri Sep 21, 2007 7:24 pm
by jgutierrez
Great!

Thank you very much Pierre.
For me that was the only feature available in Irfanview, and not in XnView... ;-)

BTW, also noticed the console output. Will this be removed in the final version, or is required because the plugin call pngout.exe?

Posted: Fri Sep 21, 2007 7:51 pm
by ouistiti
:arrow: xnview
• However, you forgot to remove the (debugging ?) DOS-box…
-Confirmed, I've it here too.
- I miss a small LNG file to translate…
- I agree, including the terms of the «Strategy» drop-down list (like “Slow”, “Fast”, “Faster” and so on)


P.S. Why do you call it "plugin" and put it in the sub-directory "Addon" ?

Friendly

Paul

Posted: Sat Sep 22, 2007 8:05 am
by xnview
ouistiti wrote:P.S. Why do you call it "plugin" and put it in the sub-directory "Addon" ?
:-) good question! Plugin folder is used for format only... (used by nconvert & GFL SDK too)

The rest ?

Posted: Sat Sep 22, 2007 4:32 pm
by Clo
:arrow: Pierre

:) Hello !

• Well, it's good to know…

- But what about the rest :
- DOS-box (needed or not ?)
- A LNG to translate ? Like Paul points out, the terms in the lists are hard-coded, so they would need strings in a LNG…

:mrgreen: KR
Claude
Clo

Posted: Sun Sep 23, 2007 2:20 pm
by XnTriq
Thanks, Pierre!

I ran a few tests on xnviewbox.jpg: :? What am I missing?

Posted: Sun Sep 23, 2007 2:35 pm
by ckit
Good lord, on those results PNGout is a complete failure!

Same, almost…

Posted: Sun Sep 23, 2007 4:39 pm
by Clo
—> XnTriq

:) Hello Mr. Librarian !
PNGout.xnp (Auto/Xtreme!): 106.767 Bytes…
• Right, I get exactly the same size here with the same settings.
- I noticed that the output PNG file contains more colours than the original JPG… :?:
- The box “Keep the order…” is unticked.
• I tested too just with “Save as…” >> PNG, I get 87,202 bytes.
- In that case, the number of colours is the same than the original.

:mrgreen: KR
Claude
Clo

Posted: Mon Sep 24, 2007 7:41 am
by xnview
XnTriq wrote:Thanks, Pierre!

I ran a few tests on xnviewbox.jpg: :? What am I missing?
Ok :-) I've uploaded a new version...

Posted: Tue Sep 25, 2007 9:30 pm
by XnTriq
xnview wrote:Ok :-) I've uploaded a new version...
Now, that's more like it! I'm getting the exact same results from both add-on and command-line version. :D
Clo wrote:However, you forgot to remove the (debugging ?) DOS-box…
I wouldn't mind a window for verbose console output. After all, processing an image can take quite some time.
PNGOUT Tutorial wrote:Verbose mode: list chunks to keep and remove. It also lists the /b# block boundaries and records the file length at each stage of the algorithm.

Code: Select all

X:\Test>pngout.exe /v xnviewbox.jpg
 In:   30096 bytes               xnviewbox.jpg /c2
Out:                             xnviewbox.png /c2 /f5
Block boundaries: 32c3,7cf3,26051 (4 blocks)

Out:  103155 -15080.3=  88074.6
Out:   87558   -218.2=  87339.7
Out:   86861   -447.7=  86413.2
Out:   86033   -185.3=  85847.6
Out:   85755    -69.2=  85685.7
Out:   85547    -46.3=  85500.6
Out:   85464    -25.7=  85438.2
Out:   85390    -13.2=  85376.7
Out:   85313    -19.3=  85293.6
Out:   85287    -18.2=  85268.7
Out:   85245     -7.3=  85237.6
Out:   85231     -0.6=  85230.3
Out:   85227     -0.2=  85226.7
Out:   85228     -0.3=  85227.6
Out:   85227 bytes
Took 21.074 sec.

Chg:  +55131 bytes (283% of original)
Typo: “If source file is in PNG, it will be overwritten... Do you want to continue?”
Clo wrote:I tested too just with “Save as…” >> PNG, I get 87,202 bytes.
Compression level 9 = 86.413 bytes / level 6 = 87.202 bytes
Clo wrote:I noticed that the output PNG file contains more colours than the original JPG… :?:
  • Test #1: Different
    1. I converted xnviewbox.jpg to xnviewbox.png with pngout /v xnviewbox.jpg.
    2. I compared xnviewbox.jpg to xnviewbox.png with imageDiff & Comparator.
      (I don't have ImageMagick Compare handy right now.)
  • Image Image
  • Test #2: Identical
    1. I converted xnviewbox.jpg to xnviewbox.bmp with XnView.
    2. I converted xnviewbox.bmp to xnviewbox.png with pngout /v xnviewbox.bmp.
    3. I compared xnviewbox.jpg to xnviewbox.png with imageDiff & Comparator.
    4. I converted xnviewbox.jpg & xnviewbox.png to jpg.bmp & png.bmp with XnView.
    5. I compared jpg.bmp & png.bmp with fc /b & bindiff.
My conclusion would be that PNGOut doesn't decode YCbCr data correctly, which fatally reminds me of my rant from a couple of weeks ago.

Foxyshadis, I know you've written a JPEG parser. So please, take a look at this and shed some light on the matter.
FYI: Today's my 2nd forum anniversary, and this is my 500th post. This means you have to grant me at least one wish! :P