LazyWeb request: I need to convert a set of 100 large-ish (500 x 500) TIFF images to PNG format. None of the tools I’ve tried so far (Paint Shop Pro on Windows, GraphicConverter on Mac OS X) have produced satisfactory results. What is the best free tool on any platform for producing highly optimized PNG files? (Presumably this would include an option to set the compression method, or perhaps try several and auto-determine which one was best for each image. I know virtually nothing about this other than reading the Introduction to PNG, so I may not be making any sense here.)

Here is a long list of PNG tools; can someone with experience in this help me decide which one to use? Compiling is not a problem, if required. I have Mac OS X, Windows, and Linux computers at my disposal.

Update: several people have recommended pngcrush, which is open source, cross-platform, and has a delightfully-named -brute flag which will try 114 different compression methods on each image and choose the one that works the best. I used my existing tools to batch convert to PNG, then used pngcrush -brute to optimize them. Thanks to all.

§

Twelve comments here (latest comments)

  1. Mark,

    You really ought to use Fireworks or ImageReady to do this kind of work… Fireworks would be my preference…

    I don’t know of any tools that are open/free that will do the job… sorry.

    — john #

  2. it won’t do the conversion, but once you do have them converted to png format, pngcrush (http://pmt.sourceforge.net/pngcrush/) can be used to optimize the files.

    i typically use it in conjunction with imagemagick (http://www.imagemagick.org/).

    — jim winstead #

  3. I think ImageMagick http://www.imagemagick.org/ would probably be the best tool. Or at least I *would* think so if I could get the web page to come up right now :-/

    — Dougal Campbell #

  4. I’d suggest using two different tools for the job, since conversion and optimization are two distinctly different tasks.

    The conversion from TIFF to PNG can be done with a number of different tools. My tool of choice is IrfanView (Win32, GUI, http://www.irfanview.com/ ). It won’t offer you any editing features, but it will read just about any image format out there and output PNGs.

    Then there is the second part, making sure the PNGs themselves are optimized. PNGCrush (”Any” platform, Command Line, http://pmt.sourceforge.net/pngcrush/ ) is really the only tool you will ever need to consider. If you have the time, or have the power, optimizing your files with the -brute option, will create the smallest files. Often 30-40% smaller than what Photoshop is generating.

    — Arve Bersvendsen #

  5. Did you try PIL? (http://www.pythonware.com/products/pil/index.htm) It might do what you want…

    — Hans #

  6. I recommend pngcrush as well, for non-lossy optimization. There are times when pngquant has been useful to me as well, if you are willing to dither down to a lower color depth. For me, the most amazing aspect of pngquant (http://www.libpng.org/pub/png/apps/pngquant.html) is that it keeps alpha transparency for the lower color depth; I always thought that you had to have a 24-bit PNG to have alpha transparency.

    Unfortunately, Internet Explorer does not seem to display an 8-bit PNG at all, if it has alpha transparency. It seems to work with Phoenix, which is Gecko-based, however.

    — caiuschen #

  7. Michael Tsai's Weblog (trackback)
  8. Hi Mark,

    I guess that John is right, Macromedia Fireworks can do the trick. I’m not sure if it has batch processing capabilities but it can handle and create png-files. There is a free demo version available on the Macromedia site.

    Dieter.

    — Dieter Gyselinck #

  9. Yup, Fireworks has batch-processing capabilities. Go through a little dialog box, set your options (including backups), and send it on its way. Nice and easy.

    — bish #

  10. I know the problem has been solved, but just for future reference ;) I usually do these kind of things with XnView (http://www.xnview.org/) on Win32. pngcrush seems interesting though.

    — Breyten #

  11. For small PNG files the most important thing to do it to get rid of unused palette entries. I forget which tools do this.

    — Anonymous #

  12. I gave pngcrush a little test by running a large batch of PNGs I had created with Fireworks through its -brute option… on average I got about a 3-5% savings in file size. I suppose Fireworks has pretty good PNG support then. Therefore I’d recommend Fireworks for all your PNG needs, even though it’s expensive.

    — Ben #

Respond privately

I am no longer accepting public comments on this post, but you can use this form to contact me privately. (Your message will not be published.)



§

firehosecodemusicplanet

© 2001–8 Mark Pilgrim