A report on Data compression and GIF

Comparison of spectrograms of audio in an uncompressed format and several lossy formats. The lossy spectrograms show bandlimiting of higher frequencies, a common technique associated with lossy audio compression.
A humorous image announcing the launch of a Tumblr account for the White House suggests pronouncing GIF with a hard g.
Solidyne 922: The world's first commercial audio bit compression sound card for PC, 1990
An example of a GIF image saved with a web-safe palette and dithered using the Floyd–Steinberg method. Due to the reduced number of colors in the image, there are display issues.
Processing stages of a typical video encoder
An animated GIF illustrating a technique for displaying more than the typical limit of 256 colors
Sample image (enlarged), actual size 3 pixels wide by 5 high
Bytes Dh to 30Ch in the example define a palette of 256 colors.
A 46×46 uncompressed GIF with 7-bit symbols (128 colors, 8-bit codes). Click on the image for an explanation of the code.
GIF can be used to display animation, as in this image of Newton's cradle.
A GIF animation made of two photos, one morphing into the other
Rotating earth (large).gif

GIF became popular because it used Lempel–Ziv–Welch data compression.

- GIF

LZW is used in GIF images, programs such as PKZIP, and hardware devices such as modems.

- Data compression
Comparison of spectrograms of audio in an uncompressed format and several lossy formats. The lossy spectrograms show bandlimiting of higher frequencies, a common technique associated with lossy audio compression.

3 related topics with Alpha

Overall

The PNG image PNG-Gradient.png viewed with a hex editor application for Ubuntu.

Portable Network Graphics

2 links

Raster-graphics file format that supports lossless data compression.

Raster-graphics file format that supports lossless data compression.

The PNG image PNG-Gradient.png viewed with a hex editor application for Ubuntu.
A demonstration of the colour depth in a PNG file, in bits per channel. Left: 8 bits, Right: 16 bits. Note the artifacts, adjusted contrast for clarity.
Example with several types of image content
251px
PNG's filter method 0 can use the data in pixels A, B, and C to predict the value for X.
A PNG with 256 colors, which is only 251 bytes large with pre-filter. The same image as a GIF would be more than thirteen times larger.
An illustration of Adam7 interlacing over a 16×16 image.
An APNG (animated PNG) file (displays as static image in some web browsers)
Composite image comparing lossy compression in JPEG with lossless compression in PNG: the JPEG artifacts can be easily visible in the background of this kind of image data, where the PNG image has solid color.

PNG was developed as an improved, non-patented replacement for Graphics Interchange Format (GIF) — unofficially, the initials PNG stood for the recursive acronym "PNG's not GIF".

The motivation for creating the PNG format was the realization that, on 28 December 1994, the Lempel–Ziv–Welch (LZW) data compression algorithm used in the Graphics Interchange Format (GIF) format was patented by Unisys.

Lossless compression

1 links

Lossless compression is a class of data compression that allows the original data to be perfectly reconstructed from the compressed data with no loss of information.

Some image file formats, like PNG or GIF, use only lossless compression, while others like TIFF and MNG may use either lossless or lossy methods.

A photo of a European wildcat with the compression rate decreasing and hence quality increasing, from left to right

JPEG

1 links

Commonly used method of lossy compression for digital images, particularly for those images produced by digital photography.

Commonly used method of lossy compression for digital images, particularly for those images produced by digital photography.

A photo of a European wildcat with the compression rate decreasing and hence quality increasing, from left to right
The 8×8 sub-image shown in 8-bit grayscale
Zigzag ordering of JPEG image components
This image shows the pixels that are different between a non-compressed image and the same image JPEG compressed with a quality setting of 50. Darker means a larger difference. Note especially the changes occurring near sharp edges and having a block-like shape.
The original image
The compressed 8×8 squares are visible in the scaled-up picture, together with other visual artifacts of the lossy compression.
Visual impact of a jpeg compression on Photoshop on a picture of 4480x4480 pixels
An example of a stereoscopic .JPS file

Such images are better saved in a lossless graphics format such as TIFF, GIF, PNG, or a raw image format.

In video compression MCUs are called macroblocks.