PNG image file structureThe building blocks within a PNG file are referred to as "chunks". Basic palette images have 4 chunks and basic RGB/grayscale images have 3 chunks. Many image editing tools add extra chunks which can adjust the way colors are displayed if a browser implements the full PNG specification, but not all browsers use the information. These extra chunks add to the file size and can be eliminated, but there are two additional chunks which are widely supported:
Of the PNG image tools reviewed on this site, Web Image Guru and TweakPNG are able to modify the internal structure of PNG files.
| Gamma correction - gAMA chunkGamma correction is the ability to correct for differences in how computer systems interpret color values. Macintosh-generated images tend to look too dark on PCs, and PC-generated images tend to look too light on Macs. PNG format allows the gamma value of the computer which created an image to be embedded into the image file. Browsers and image software which support the feature can extract the gamma value and make a correction if the host computer uses a different gamma setting. Many image editing tools for Windows systems assume a gamma value in the region of 0.45455, which may not be completely accurate. Gamma correction is a good idea, but it is not wise to rely on it to match image colors to HTML/CSS background colors.
|
Background color - bKGD chunkIf a PNG alpha image is saved with a background color, Internet Explorer for Windows versions earlier than IE7 render the alpha channel against that background. In all other modern browsers the background will be transparent. By default, Internet Explorer versions earlier than IE7 set a gray background. | Text annotations - tEXt chunkWith TweakPNG you can add any text annotations you want -- a description of the image, the date of creation, copyright information, etc. The available options are shown in the screenshot below. There's also a built-in image viewer. |