I see that you like pngslim. Perhaps you are interested in my little tool called optimipng. It should be on par or better compared to pngslim but is a hell more configurable. Also it supports multi-processing and is Windows and Linux!
Thanks for the heads-up! I would love to speak with you more about optimipng to see what might be done to create some type of "Installation and Usage Guide for Dummies" set of instructions related to that program. I have Ruby 1.86 and I also downloaded your version 0.63 script this afternoon...but I have not yet been able to make sense of getting that program to function on my computer, even after referencing your Readme file. Programming isn't a strength of mine, but I am at least good enough around Ruby and other products where I'm not afraid to jump in with both feet! :-) If I cannot figure out how to get optimipng working on my computer though (PC laptop, Windows XP), I can only imagine how much trouble people with much less experience looking and working "under the hood" on their computers will have in allowing optimipng to function on their computers, at least with out a little more help and instructions.
First things first, however. If you can help me figure out how to get the program working on my computer, I/we might be able to help put together some type of tutorial that would help others have an easier time with the install and usage portions of the process. I'd really like to get this working on my computer and see how it measures up to Andrew's work on PNGSlim. If it results in comparable/superior .png file sizes, I'll definitely make sure to help spread the word about it on our web site and blog as best I can. PNGSlim is REALLY nice too in the fact that one can highlight 15-20 files and drag them on top of a simple .cmd function that comes with the installation...with the program then taking care of the rest! That's incredibly simple for the average person to use, which makes it very appealing to the less computer-savvy individuals out there.
Thanks for the information! I will look forward to hearing back from you again soon.
I'm back from the exams at college! I hoped the package is rather standard for a scripted tool. Under Windows you'll have to execute "ruby optimipng.rb --help" for a start. If it does not run, it should complain about what's missing. I could put the unrelated .rb files to a separate directory, though.
Thanks. It does open up a run/command-line window when I try and execute "ruby optimipng.rb", but then the dialog window disappears in a fraction of a second...before I am able to enter any type of command.
I think what would help is instructions "for dummies"....so that someone who is not a programming expert could still navigate their way through the process. Once those skeleton-instructions have been crafted, more-detailed ("for DUMMIES!" not just "dummies" - Ha!) could be created as well. I think the ideal though would be for the establishment or creation of something like the ".cmd" file that PNGSlim uses...where all a person needs to know how to do is simply highlight and drag files on top of that command-line executable for the process to run.
In the interim, some other questions I have about optimipng are:
1. Cell phone "tweak." Some cell phones had issues displaying .png files that resulted from earlier .png files that resulted from PNGSlim. I saw in that discussion thread you pointed me to that you seemed to have acknowledged and addressed that same issue, but I just wanted to verify that fact...as a BIG part of people's interest in G.O. services relate to mobile apps.
2. Transparency. I assume optimipng preserves 24-bit .png files and any transparency found within those files. However, I want to make sure and verify that fact...as assuming that only to find out otherwise could be disastrous for some folks out there...
Thanks for taking the time to walk through these things with me! Once we can get it installed and fully functioning, I wholeheartedly promise to give optimipng a heavy work-out on a few thousands images, then will report my experiences as a part of our web site and blog.
Ok I see where the problem might be. This program is command-line style. This usually invovles to start a command window and to navigate to your directory. For your convinience, I created a small cmd file which you can put into the optimipng directory and execute by double-clicking. It's displaying the help message now. In order to make optimipng fly, right click on the cmd file and hit edit. In the resulting text, delete --help and replace (path here) with a path where your PNG files are located (e.g. c:\myPngFiles).
About your questions:
1. You can set the mincodes option of pngout in PngConfig.yaml. This should help with buggy mobiles. See this thread and this thread for reference.
2. Transparency is preserved. If not it's either a bug in optimipng or a bug in the tools used ;)
PNG Optimizer 0.63 in local mode (CTRL-C to stop)
Processing C:/temp/mnscu
ImageMagick registry entry not present, trying to add keys (HKLM\Software\ImageM
agick\6.3.0\Q:8) ... sucessful
starting 2 concurrent processes
registered client #1
registered client #2
commands:
'finish': global stopping after current files
'finish local': local stopping
'exit': killing local processes and stopping
WINDOW #2 (titled optimipng local process #1) 'C:\Program' is not recognized as an internal or external command, operable program or batch file.
WINDOW #3 (titled optimipng local process #2) 'C:\Program' is not recognized as an internal or external command, operable program or batch file.
I manually copied a copy of PNGOUT out of PNGSLim into c:\Program Files\optimipng-0.63\pngtools\win32\pngout.exe, as before I did this, the .cmd file kept reporting "PNGOUT not found."
I'm still stuck...but at least we're getting closer...
Derek
P.S. I could still use a bit of "for dummies" instructions on how to set the mincodes options for pngout in that PngConfig.yaml file. I'd just like to set it to ALWAYS make sure and eliminate the problem with more temperamental cell phones and be done..since one thing I/we always have to be careful about with image optimization is leaving things either better or at LEAST as good as we found them. A couple instances of people seeing a reduction in image quality can lead to them abandoning the whole concept...sacrificing terabytes of potential bandwidth in the process. Whatever we can do to make sure that NO problems (even on buggy cellphones) will result will go a long, LONG way.
Nice! :)
The problem now is, that there should not be blanks in the path name where the program is stored. This will be fixed soon. So unfortunately C:\Program Files is not suitable (in Germany, this path has not blanks). Just try another folder on the disk (e.g. c:\optimipng).
Pngout is not included due to licensing.
For maximum comptibility with mobiles, it should read :mincodes: 2 in the PngConfig.yaml. This should add some Bytes in pngout and also disables DeflOpt adding some more Bytes. So this should only be used when optimizing for mobiles.
A bit MORE progress today...but still no luck (unless the following message occurred because optimipng simply couldn't make the PNGSlim output smaller in size?):
The unprocessed log file basically just confirmed the eight .png files that optimipng did not successfully process. We're getting closer...but still not there. Any other ideas? Thanks for all your help!
Derek
EDITED TO ADD: I didn't see your 0.64.1 release posting until after I had drafted this post. I'll give those new files a quick-look and let you know how things go!
I think we're getting closer though.... :-) One non-techie question: I noticed that when I unzip the optimipng files, it creates an "optimipng-0.64.1" folder, then creates a SECOND "optimipng-0.64.1" folder that then has all of the files and folders within it. I always move everything up a layer to remove the redundant "optimipng" folders after I extract everything from the .7z file. Any chance that might be causing some of the issues?
Derek
Quick reply regarding the folders issue. It's the way you unzip the package. In the Linux world is common to to put all files in a folder and then zip the folder. In the Windows world you commonly zip only the files. This would be a tar-bomb in Linux and I don't want to be unpolite ;)
I use rar zu upack the stuff and a right click offers me "extract here" instead of "extract to".
Ok this error is caused by RMagick. This is the software which compares the original and the optimized pixel-by-pixel. It's known to be hard to install ;) During testing it's not necessary. You can turn it off when you change :useRMagick : int he config from true to false.
The error about the existing file also bothers me. Checking it now.
About the error in the last picture: I found the reason. It's because the environment variable I use for fetching the TEMP folder in Windows uses backslashes as path-delimiter. And Ruby expects forward-slashes. Will upload a new version soon.