Graphics Optimization

Optimizing imagery for internet and software-based applications.

Hello Derek!

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!

http://www.jonof.id.au/forum/index.php?topic=1400.msg8649#msg8649

Share

Reply to This

Replies to This Discussion

New version available, RMagick and the file exists problem should be solved. I hope it's succeeding now!

http://joachimkluge.de/png/optimipng-0.64.2.7z

Reply to This

Bad news....still not working for me:


Not sure what else I can try on my end...but it's time for me to head to bed! I'll be back to check-in again tomorrow though. Thanks for all your time and effort!

Derek

Reply to This

Well the I know exactly why RMagick isn't working. The error is because you have the wrong location for ImageMagick in your registry. Please run regedit and delete the folder HKEY_LOCAL_MACHINE\Software\ImageMagick. If the error persists, try to disable RMagick for now. I already explained that you can turn it off when you change :useRMagick : in PngConfig.yaml from true to false.
The folder handling is strange. Could you please also delete c:\documents and settings\derek...\local settings\temp\optimipng*?

I am sorry that we don't get it working so fast. It's a bit emberassing to me. But Ruby for Windows is a bit more complicated. The code for Linux is much more straightforward.

Reply to This

It's kind of strange that the old 8.3 file name convention is displayed. Could you also please start cmd.exe and execute set? There should be an entry named TEMP or TMP on one line now. Please copy it for me here.

Reply to This

Okay, I ran regedit and deleted that "ImageMagick" folder, as well as deleted TWO folders in ..\local settings\temp (optimipng-1 and optimipng-2). When I "execute set", here is what I currently see:

TEMP=C:\DOCUME~1\DEREKT~1\LOCALS~1\Temp
TMP=C:\DOCUME~1\DEREKT~1\LOCALS~1\Temp

No worries on all these issues! You've been very helpful in trying to work through them with me...which will hopefully help BOTH of us going forward (me having more options for PNG optimization to share with people who use our web site and blog, you with strengthening your program just a bit more and prepping it for broader distribution). I haven't touched the PngConfig.yaml file yet (to disable RMagick)...just in case we can resolve the issues we've been having without having to disable that service.

Hope that helps! I'll be anxious to hear back from you. Thanks!

Derek

Reply to This

Ok, the ImageMagick issue should be settled now. You can try to run optimipng again.
The folder issue seems to related to a slight incompatibility of ruby with the short filenames of Windows. When optimipng refuses to run because of this you can just delete the folders before each run.

Reply to This

Okay jokluge, I FINALLY got optimipng working tonight (although the local process #1 window still gave me that "could not create....../Temp/optimipng-2/!" error message. That issue aside, I ran eight "test" images that had previously been run through PNGSlim in optimipng. In six instances, it said "valid, bigger, not using new file" and in the remaining two instances, it said "valid, same size, not using new file," even though in all eight cases, it appeared that optimipng produced an identical final image size (even before the "revert"). Strange. Just as an FYI, I hadn't changed the mincode reference for those test images either.

Good news, bad news, I suppose! :-) The GOOD news is that it looks as though optimipng is producing comparable results to PNGSlim (eight images which resulted in the EXACT same final image size before reverting to the "old" image after not producing smaller results). The BAD news is that optimipng was not producing better results than PNGSlim.

One thing I really appreciate in optimipng though is that it shows me exactly what it is doing while it is working to determine the smallest possible file sizes. PNGSlim kind of walks you through a summary of "Step One...Step Two....etc.," but one cannot really appreciate all of the work that is taking place behind the scenes. I suppose only hard-core image "geeks" like myself might appreciate the full magnitude of that though. :) Another thing I really like about your process to is the "Statistics" summary that is found at the beginning of each process. I've frequently referred to "square pixels" or "total pixels" that an image comprises (width x height), and it's fun to see someone else reference that in their optimization work as well. Making an image unnecessarily large (even 300 pixels w/h vs. 295 pixels w/h) can make a huge impact in the amount of bits and bytes that need to be processed as a result.

I'd love to keep working with you on this service though if you don't mind all the time/chat back and forth! Anything I can do to be of assistance as you work to improve optimization results of .png output is well worth the effort to me.

Thanks!

Derek

Reply to This

Great! I'm glad you got it working! It's not unexpected that pngslim is superior with my default settings. That's because the pngout randomize trials. Pngslim does instructs pngout to generate 100 Huffman trees and try them out. You can do this with optimipng too. I disabled it for performance reasons. Just set :usePngoutRandomized: from false to true in PngConfig.yaml. Also set the :randomizedRuns: to 100.

About the folder issue: I prepared a test file which checks what goes wrong. You can get it here: http://joachimkluge.de/png/files.rb
Just save it in a folder. Then you must check which folders of optimipng-X are existing in your temp folder. For example there is a folder optimipng-1. Now start files.rb by double-clicking it and follow the instructions.

Reply to This

Hello!

Tried your suggestions ("set :usePngoutRandomized: from false to true in PngConfig.yaml. Also set the :randomizedRuns: to 100."). Worked fine, though I got essentially the same results. 7 of 8 images were exactly the same optimized size as the original PNGSlim output, one image was larger after optimipng and reverted back to the original file.

I haven't had a chance to look at that "folder" issue yet, but I wanted to report back as to my results after re-running those test images through optimipng with your additional recommended changes to the .yaml file. Thanks!

Derek
Ok :) could you please send me the file which turns out larger?
E-Mail is in the README!

Reply to This

RSS

Badge

Loading…

© 2009   Created by Derek Tonn on Ning.   Create a Ning Network!

Badges  |  Report an Issue  |  Privacy  |  Terms of Service