PNGout

Ask for help and post your question on how to use XnView Classic.

Moderators: XnTriq, helmut, xnview

User avatar
xnview
Author of XnView
Posts: 44930
Joined: Mon Oct 13, 2003 7:31 am
Location: France

PNGout

Post by xnview »

I would like to know if a PNGout plugin would be a good thing?
Pierre.
ckit
XnThusiast
Posts: 2577
Joined: Tue Feb 17, 2004 1:11 am
Location: QLD, Australia

Post by ckit »

I don't see why it wouldn't be a good addition to XnView, please add it :)
AMD Ryzen 3 3300X 3.8Ghz, 16Gb DDR4, RX6600XT with Dell U2520D at 2560x1440@60Hz scaling 125%
Windows 11 Pro x64 23H2, Listary Pro, PowerToys and Wintoys
Guest

Post by Guest »

Sounds really good, I already use PNGout in Infranview.
User avatar
XnTriq
Moderator & Librarian
Posts: 6388
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Post 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.
User avatar
xnview
Author of XnView
Posts: 44930
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: PNGout

Post by xnview »

Ok, here is a first version of PNGout plugin

http://www.xnview.com/download/addons/PNGout.zip
Pierre.
User avatar
Clo
XnThusiast
Posts: 4441
Joined: Sun Oct 17, 2004 4:57 am
Location: Bordeaux, France

Debug Dos-box

Post 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
Old user ON SELECTIVE STRIKE till further notice
jgutierrez
Posts: 53
Joined: Tue Nov 15, 2005 9:25 am

Post 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?
User avatar
ouistiti
Posts: 353
Joined: Mon Oct 25, 2004 7:28 pm
Location: Belgique

Post 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
L'important n'est pas de convaincre, mais de donner à réfléchir.
The important thing is not to convince, but to incite to think.

1,77245385090552...
User avatar
xnview
Author of XnView
Posts: 44930
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Post 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)
Pierre.
User avatar
Clo
XnThusiast
Posts: 4441
Joined: Sun Oct 17, 2004 4:57 am
Location: Bordeaux, France

The rest ?

Post 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
Last edited by Clo on Sun Sep 23, 2007 3:35 pm, edited 1 time in total.
Old user ON SELECTIVE STRIKE till further notice
User avatar
XnTriq
Moderator & Librarian
Posts: 6388
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Post by XnTriq »

Thanks, Pierre!

I ran a few tests on xnviewbox.jpg: :? What am I missing?
ckit
XnThusiast
Posts: 2577
Joined: Tue Feb 17, 2004 1:11 am
Location: QLD, Australia

Post by ckit »

Good lord, on those results PNGout is a complete failure!
AMD Ryzen 3 3300X 3.8Ghz, 16Gb DDR4, RX6600XT with Dell U2520D at 2560x1440@60Hz scaling 125%
Windows 11 Pro x64 23H2, Listary Pro, PowerToys and Wintoys
User avatar
Clo
XnThusiast
Posts: 4441
Joined: Sun Oct 17, 2004 4:57 am
Location: Bordeaux, France

Same, almost…

Post 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
Old user ON SELECTIVE STRIKE till further notice
User avatar
xnview
Author of XnView
Posts: 44930
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Post 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...
Pierre.
User avatar
XnTriq
Moderator & Librarian
Posts: 6388
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Post 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
Last edited by XnTriq on Thu Sep 27, 2007 9:30 pm, edited 1 time in total.