DelphiFAQ Home Search:

InterBase, MS-SQL, mysql, Oracle
C#, C++, Delphi, Java,
JavaScript, perl, php, Visual Basic, VBScript
Apache, Network, Shell
Web Publishing
JavaScript, perl CGI, VBScript, Web Hosting
Apache, File Types, Internet Explorer,
Network, Printing, Processes
Outside the Cube
Auto, Computer Hardware,
Finances, Dating Scams,
Household, Male Dating Scammers,
Other Scams, Travel

Featured Article

Saving images as PNG or GIF?


Should I save our web site's images as .PNG or as .GIF images?


In the far past, GIF was the standard for non-photographic images while JPEG was for photographic images. The reason is that GIF only allows 256 colors and its compression algorithm is more suited for computer drawings such as buttons, lines etc. The JPEG algorithm is very bad at such graphics e.g. it will have a big quality problem with compressing an image that consists of a thin black line on white ground. GIF would be ideal for that. JPEG on the other hand is ideal for compressing a photo of a sunset with no visible loss. (It does lose many pixels' exact color information but not visible to the human eye.)

After GIF had become a standard, the US based company Unisys remembered that they had a patent on the LZW compression algorithm which is used in GIF. They charged a fee for any application that could read or write GIF images. Note: The Unisys LZW patent expired in the USA on June 20, 2003. It also expired in Canada, France, Italy, Germany, the United Kingdom, and Japan.

For that reason in 1995 an alternative for GIF was created: PNG.

PNG is like GIF lossless, meaning very suitable for computer graphics. It compresses better than GIF though, in almost all cases. PNG also allows more than 256 colors plus it allows variable transparency (alpha channel). PNG allows to store correction factors for brightness (gamma factor) and color hue (GIF does not).

When PNG came out, it was questionable if it was going to be successful simply because GIF images were everywhere and supported by all software (even though the publisher had to pay a fee to Unisys then, even if it was freeware).

However, since ~ 2000, all browsers support PNG, meanwhile even the dreaded Internet Explorer does it error-free.

Therefore I recommend using PNG images for new projects.

Visit to see about the status of PNG support and development.

Generated 8:01:56 on Apr 7, 2020