I would just add that while GIMP can save indexed PNG files (by converting your image to Indexed mode before saving), the transparency of the resulting image will be just the same as if you were to save the file as a GIF. This is a bit unfortunate since the PNG file format allows indexed images to have various levels of transparency, with the tradeoff being that a color is lost for each level of transparency. E.g., you could have 240 opaque colors with 16 different levels of transparency; or 128 colors with 128 levels of transparency -- or (the GIMP default and the only option available with GIFs) 255 colors and 2 levels of transparency (opaque or transparent).
In many cases, indexed PNG images will be much smaller than their RGB counterparts (as much as 90% savings) and the degradation of image quality may be acceptable depending upon your needs. If you want to take advantage of these smaller filesizes then you will need to use a program other than GIMP that does a better job of producing indexed PNG files.
The following image was produced with
PNGNQ and is only 74Kb.
Attachment:
test-nq8-defaults.png [ 73.71 KiB | Viewed 2356 times ]
Here is the original RGB PNG, which has a file size of 550Kb.
Attachment:
test-rgb.png [ 556.31 KiB | Viewed 2356 times ]
And here is the image saved as a GIF, with a file size 80Kb (larger than the indexed PNG). As previously discussed, the partial transparency is lost. The image is basically of lower quality than the indexed PNG, but this is attributable to the improved conversion algorithms of the PNGNQ program. I used GIMP to create the GIF file and there are other dedicated GIF convertors that do a better job and should be able to match the quality of the indexed PNG (disregarding the transparency issue).
Attachment:
test-rgb.gif [ 80.13 KiB | Viewed 2356 times ]
Unfortunately, GIMP will incorrectly load the indexed PNG (the first of the above images) as though it were an indexed GIF, corrupting the transparency information and producing an image similar to the GIF image above. Nonetheless, your webpage should display the image properly.