views:

124

answers:

4

Some PNG images although just 150px x 160px wide have 60KB filesize. I've already run them though optimizers (ImageOptim for Mac) but that didn't help much.

Is there any way to compress it further, either manually or using some other tool? 60KB for a normal 150x160 image is really unacceptable and I can't use JPG or GIF there because I need transparency.

Edit: I tried exporting the PNGs as 8-bit PNG and the filesize has reduced significantly!

Thanks

+2  A: 

Have you tried PNGOUT?

Scott
+2  A: 

Tried exporting the same PNGs as 8-bit PNG and the filesize has reduced significantly.

Steps:

  • Open the PNG in Photoshop
  • File > Save for Web and Devices
  • Select "PNG-8 128 Dithered" from the "Preset" dropdown
  • Save

Reduced a 31kb image to 10kb.

Nimbuz
+2  A: 

There are a couple of good articles on Smashing Magazine about optimizing PNG images, Clever PNG Optimizaiton Techniques and PNG Optimization Guide: More Techniques. These focus on manipulations you can do to the source image to make them work better for PNG compressors.

Beyond that, I'd recommend a tool like OptiPNG or PNGCRUSH.

Brian Campbell
+3  A: 

This has to do with how PNG compression works.

Unlike JPEG, PNG is a lossless format, position-wise, but not necessarily color-wise.

That is - while JPEG stores transitioning of colors from one area to another, PNG stores the data pixel by pixel and then losslessly compresses this data.

The difference between GIF and PNG actually comes from traditional conventions -- GIF was traditionally saved as 8-bit whereas PNG, which came later, was often saved as 32-bit (true color + alpha/transparency). So, the 32-bit image will require four times as much uncompressed data per pixel, and depending on the specifics of the image, the more detailed the data, the worse it compresses losslessly.

Hence, if you were to compare a 8-bit PNG to a 8-bit GIF, the file sizes should be very similar. The same applies with true color PNG vs true color GIF. This explains why selecting the 8-bit option will solve the file size issue. Otherwise, it's effectively a compressed BMP.

marklu