PNGs Recompressed

This section is now closed.
Forum rules
This forum is now closed.

For help with current Audacity, please post to the 2.x. board for your operating system.

Please post feedback about the current 2.x version on the 2.x.feedback board.
Locked
Zhelkus
Posts: 3
Joined: Tue Jun 22, 2010 3:45 am
Operating System: Please select

PNGs Recompressed

Post by Zhelkus » Tue Jun 22, 2010 4:00 am

Hi. I've been using Audacity for quite some time and I wanted to say that it's a great audio editing program!

So I've been fooling around with some images on my computer and I found that there were many PNGs in the Audacity documentation. I ran pngout on them and I scraped off some space. Maybe the developers might be interested in including these with the next installation? They're the exact same thing, just smaller in file size. :mrgreen:

Audacity 1.3 Beta (Unicode) PNG Originals (5,538 KBs)
Audacity 1.3 Beta (Unicode) PNG Recompressed (3,812 KBs)

I included two sets in case anybody's interested in comparing. :geek:

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: PNGs Recompressed

Post by Gale Andrews » Wed Jun 23, 2010 8:40 am

Thanks for the idea and the downloads. The compression achieved is quite good. What actually happens for each Beta release is that the Manual contents are dumped from the Wiki, and we have to use that content because it will be most current. Then the documentation, executable and supporting folders are compressed into the Installer (or the zip).

I'd expect this specialised compression for PNGs would be better than that achieved by the installers, but is there an easy way to make pngout find the images in one step within the complex folder structure in the Manual? Typing multiple paths or moving all the pngs into one folder and out again wouldn't seem to be worth it.


Thanks



Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

Zhelkus
Posts: 3
Joined: Tue Jun 22, 2010 3:45 am
Operating System: Please select

Re: PNGs Recompressed

Post by Zhelkus » Thu Jun 24, 2010 3:05 am

Gale Andrews wrote:is there an easy way to make pngout find the images in one step within the complex folder structure in the Manual? Typing multiple paths or moving all the pngs into one folder and out again wouldn't seem to be worth it.
Not that I know of... The program only supports a primitive parameter input interface. If you want to automate the compression of PNGs added to the wiki and all the PNGs that are already there then your best shot would be with a batch file ;)

The idea to make it effective would be to run PNGOUT on an image with all 6 compression filters and select the smallest one replacing the source image.

I don't have a batch file like that, I'm kinda of a noob at it. :oops: What I did was run pngout on the same file overwriting continuously all the way through the 6 filters. It won't overwrite if the resulting image's size is larger. :geek:

I could help out on the matter if you'd like... as a... "sorta-knowledge advisor??" :mrgreen:

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: PNGs Recompressed

Post by Gale Andrews » Thu Jun 24, 2010 3:37 am

Here are the python scripts that dump from the Wiki and execute the dump scipt to put the contents into our help folder.

I'm interested if you come up with something (including a script for pngout to operate on all the images inside a particular folder including subfolders). There doesn't seem to be any MediaWiki extension to optimise pngs at upload time.

Thanks


Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

X-Fi6
Posts: 7
Joined: Sun May 02, 2010 12:07 am
Operating System: Please select

Re: PNGs Recompressed

Post by X-Fi6 » Thu Jul 15, 2010 6:24 am

I ran some tests a while back on comparing the performance and results of pngcrush, optipng (a fork of pngcrush; I have no clue why it needed to be forked), and pngout.

Pngout produced PNGs smaller than pngcrush/optipng about the same as it did larger and actually destroyed the embedded ICC profile in one of the test images.

Zhelkus
Posts: 3
Joined: Tue Jun 22, 2010 3:45 am
Operating System: Please select

Re: PNGs Recompressed

Post by Zhelkus » Thu Jul 15, 2010 7:58 am

Pngout will get rid of every expendable chunk of png data unless specified. Your test is interesting but I personally believe that it is completely broken and thus pointless. Looking at your batch files, you automated every image to be processed with optipng and pngcrush with a brute compression routine... but with pngout you simply used the default compression method. I ran all methods on my own just in case and managed to shave off 50KBs more from 0.png. That makes your comparison worthless. Based on personal experience with the program, I can assure you -I daresay "prove me wrong"- that any png found on the internet can be compressed better with pngout than with those two programs in your comparison. Advpng wouldn't be far behind... you could consider it if you find all this interesting. As to why people still use pngcrush is beyond me. It's like web developers still using GIFs or comic/manga readers still using CDisplay. And why it need to be forked... well, like you said: no clue. Perhaps the only disadvantage I see is speed. But is speed really important, all things considered? :ugeek:

Here is a suggested correction for your pngout batch file to make it use a "manual" brute compression if you're interested in doing it again proplerly:

Code: Select all

pngout 0.png /f0 /y 0_pngout.png
pngout 0.png /f1 /y 0_pngout.png
pngout 0.png /f2 /y 0_pngout.png
pngout 0.png /f3 /y 0_pngout.png
pngout 0.png /f4 /y 0_pngout.png
pngout 0.png /f5 /y 0_pngout.png
pngout 1.png /f0 /y 1_pngout.png
pngout 1.png /f1 /y 1_pngout.png
pngout 1.png /f2 /y 1_pngout.png
pngout 1.png /f3 /y 1_pngout.png
pngout 1.png /f4 /y 1_pngout.png
pngout 1.png /f5 /y 1_pngout.png
pngout 2.png /f0 /y 2_pngout.png
pngout 2.png /f1 /y 2_pngout.png
pngout 2.png /f2 /y 2_pngout.png
pngout 2.png /f3 /y 2_pngout.png
pngout 2.png /f4 /y 2_pngout.png
pngout 2.png /f5 /y 2_pngout.png
pngout 3.png /f0 /y 3_pngout.png
pngout 3.png /f1 /y 3_pngout.png
pngout 3.png /f2 /y 3_pngout.png
pngout 3.png /f3 /y 3_pngout.png
pngout 3.png /f4 /y 3_pngout.png
pngout 3.png /f5 /y 3_pngout.png
pngout 4.png /f0 /y 4_pngout.png
pngout 4.png /f1 /y 4_pngout.png
pngout 4.png /f2 /y 4_pngout.png
pngout 4.png /f3 /y 4_pngout.png
pngout 4.png /f4 /y 4_pngout.png
pngout 4.png /f5 /y 4_pngout.png
pngout 5.png /f0 /y 5_pngout.png
pngout 5.png /f1 /y 5_pngout.png
pngout 5.png /f2 /y 5_pngout.png
pngout 5.png /f3 /y 5_pngout.png
pngout 5.png /f4 /y 5_pngout.png
pngout 5.png /f5 /y 5_pngout.png
pngout 6.png /f0 /y 6_pngout.png
pngout 6.png /f1 /y 6_pngout.png
pngout 6.png /f2 /y 6_pngout.png
pngout 6.png /f3 /y 6_pngout.png
pngout 6.png /f4 /y 6_pngout.png
pngout 6.png /f5 /y 6_pngout.png
pngout 7.png /f0 /y 7_pngout.png
pngout 7.png /f1 /y 7_pngout.png
pngout 7.png /f2 /y 7_pngout.png
pngout 7.png /f3 /y 7_pngout.png
pngout 7.png /f4 /y 7_pngout.png
pngout 7.png /f5 /y 7_pngout.png
pngout 8.png /f0 /y 8_pngout.png
pngout 8.png /f1 /y 8_pngout.png
pngout 8.png /f2 /y 8_pngout.png
pngout 8.png /f3 /y 8_pngout.png
pngout 8.png /f4 /y 8_pngout.png
pngout 8.png /f5 /y 8_pngout.png
pngout 9.png /f0 /y 9_pngout.png
pngout 9.png /f1 /y 9_pngout.png
pngout 9.png /f2 /y 9_pngout.png
pngout 9.png /f3 /y 9_pngout.png
pngout 9.png /f4 /y 9_pngout.png
pngout 9.png /f5 /y 9_pngout.png
The idea is that pngout will not overwrite the source image if it produces a larger file: brute compression "borked" :P.


Gale! This overwriting routing can be used on the wiki dump. Simply making a quick script that processes the same image with all 6 filters guarantees maximum compression ;)

PS: X-Fi6: Bionic Commando. Very cool! :mrgreen:

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: PNGs Recompressed

Post by Gale Andrews » Thu Jul 15, 2010 7:50 pm

Zhelkus wrote:This overwriting routine can be used on the wiki dump. Simply making a quick script that processes the same image with all 6 filters guarantees maximum compression
Thanks. I would definitely try it if you wanted to make a script that finds all the images inside the folder structure.



Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

Locked