Friday, November 13, 2009

Optimizing PNG images

You might say "Who cares about file size nowadays? Modern PCs have hard disks with zillions of bytes of capacity. Why bother with file size optimization?"

It is true that modern hard disks have a much larger capacity than, let's say, 15 years ago when a 1 GB hard disk was considered a luxury. Today even USB flash drives have a larger capacity. But there are cases when file size really matters.

It might be the case if you run a Web site. In most cases, you've subscribed to only a limited monthly bandwidth. Now if your site has only a few visitors a day, probably your bandwidth limit is irrelevant. It will hardly be ever exceeded. But if your site has hundreds or thousands of visitors a day, the weight of your files might be critical. Let's suppose that your site harbors a 1 MB picture. If it gets viewed 100 times, this will add 100 MB to the traffic of your site. 1,000 views will generate an extra gigabyte of traffic. What if it gets viewed 10,000 or even more times? It isn't hard to imagine how many gigabytes of your allowed bandwidth will be eaten up. This is why optimizing graphic files saves site traffic. This in turn might allow you to switch to a cheaper Web hosting plan and save you money. Optimized pictures will also load faster in your visitors' Web browsers, and browsing your site will be all the more pleasant.

Having optimized graphic files in the eBooks or documents you create might also be important to spare download time to readers.

Now how can you optimize picture size?

Pictures already included in documents can be optimized in Atlantis by reducing their quality. But graphic files can also be optimized directly on your hard disk using OptiPNG by Cosmin TruĊ£a. This free utility shrinks PNG image files (PNG being one of the most popular image formats among Web site designers). OptiPNG performs lossless optimization of PNG files, plus it can convert images in other formats (BMP, GIF, etc) to optimized PNG.

OptiPNG is a command-line (console) application for Windows. You can download it directly from its home site:

But there is a more convenient way to use this utility. A special setup file of OptiPNG created by Dmitry Vlasko not only installs OptiPNG on your system, but also integrates it into the Windows shell. Pictures can then be optimized directly in Windows Explorer by right-clicking their filenames. You'll find this setup file at the OptiPNG Windows shell integration home page.

Here are full instructions on how to install and use this utility:

Click the following link to download the SetupOptiPNG.rar compressed file:

Then extract SetupOptiPNG.msi from SetupOptiPNG.rar, run it, and follow the onscreen instructions.

To adjust the OptiPNG settings, use the "Start > Programs > OptiPNG Settings" shortcut.

To optimize any PNG image on your hard disk, right-click it in Windows Explorer, and choose the "OptiPNG: default profile" menu command:

What could be more convenient?

No comments: