Graphics Interchange Format, GIF (CompuServe GIF) is a graphics format widely used on the World Wide Web, both for images and for animations. The format was developed by CompuServe in 1987 to provide a color image format for their file downloading areas, replacing their earlier RLE format in black and white. GIF became popular because they could use the LZW compression algorithm (Lempel Ziv Welch) for compressing the image, which was more efficient than the algorithm Run-length encoding (RLE) used by the PCX and MacPaint formats. Therefore, large images could be downloaded in a reasonable period of time, even with very slow modems.
Portable Network Graphics (PNG), is a raster graphics file format that supports lossless data compression. PNG was created as an improved, non-patented replacement for Graphics Interchange Format (GIF), and is the most used lossless image compression format on the Internet. PNG supports palette-based images (with palettes of 24-bit RGB or 32-bitRGBA colors), grayscale images (with or without alpha channel), and full-color non-palette-based RGB[A] images (with or without alpha channel). PNG was designed for transferring images on the Internet, not for professional-quality print graphics, and therefore does not support non-RGB color spaces such as CMYK.