ArticleslgStudy

science

Image compression

Image compression is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Image compression rather than just read about it. In short: Image compression is a type of data compression applied to digital images, to reduce their cost for storage or transmission. Algorithms may take advantage of visual perception and the statistical properties of image data to provide superior results compared with generic data compression methods which are used for other digital data.

Image compression — main illustration
Image compression — illustration

Key takeaways

  • Image compression belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Image compression to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Image compression from memory before moving on to harder problems.

Reference excerpt

Image compression is a type of data compression applied to digital images, to reduce their cost for storage or transmission. Algorithms may take advantage of visual perception and the statistical properties of image data to provide superior results compared with generic data compression methods which are used for other digital data.

Lossy and lossless image compression Image compression may be lossy or lossless. Lossless compression is preferred for archival purposes and often for medical imaging, technical drawings, clip art, or comics. Lossy compression methods, especially when used at low bit rates, introduce compression artifacts. Lossy methods are especially suitable for natural images such as photographs in applications where minor (sometimes imperceptible) loss of fidelity is acceptable to achieve a substantial reduction in bit rate. Lossy compression that produces negligible differences may be called visually lossless. Methods for lossy compression:

Transform coding – This is the most commonly used method. Discrete Cosine Transform (DCT) – The most widely used form of lossy compression. It is a type of Fourier-related transform, and was originally developed by Nasir Ahmed, T. Natarajan and K. R. Rao in 1974. The DCT is sometimes referred to as "DCT-II" in the context of a family of discrete cosine transforms (see discrete cosine transform). It is generally the most efficient form of image compression. DCT is used in JPEG, the most popular lossy format, and the more recent HEIF. The more recently developed wavelet transform is also used extensively, followed by quantization and entropy coding. Color quantization - Reducing the color space to a few "representative" colors in the image. The selected colors are specified in the color palette in the header of the compressed image. Each pixel just references the index of a color in the color palette. This method can be combined with dithering to avoid posterization. Whole-image palette, typically 256 colors, used in GIF and PNG file formats. block palette, typically 2 or 4 colors for each block of 4x4 pixels, used in BTC, CCC, S2TC, and S3TC. Chroma subsampling. This takes advantage of the fact that the human eye perceives spatial changes of brightness more sharply than those of color, by averaging or dropping some of the chrominance information in the image. Fractal compression. More recently, methods based on Machine Learning were applied, using Multilayer perceptrons, Convolutional neural networks, Generative adversarial networks and Diffusion models. Implementations are available in OpenCV, TensorFlow, MATLAB's Image Processing Toolbox (IPT), and the High-Fidelity Generative Image Compression (HiFiC) open source project. Methods for lossless compression:

Run-length encoding – used in default method in PCX and as one of possible in BMP, TGA, TIFF Predictive coding – used in DPCM Entropy encoding – the two most common entropy encoding techniques are arithmetic coding and Huffman coding Adaptive dictionary algorithms such as LZW – used in GIF and TIFF DEFLATE – used in PNG, MNG, and TIFF Chain codes

Other properties The best image quality at a given compression rate (or bit rate) is the main goal of image compression, however, there are other important properties of image compression schemes: Scalability generally refers to a quality reduction achieved by manipulation of the bitstream or file (without decompression and re-compression). Other names for scalability are progressive coding or embedded bitstreams. Despite its contrary nature, scalability also may be found in lossless codecs, usually in form of coarse-to-fine pixel scans. Scalability is especially useful for previewing images while downloading them (e.g., in a web browser) or for providing variable quality access to e.g., databases. There are several types of scalability:

Quality progressive or layer progressive: The bitstream successively refines the reconstructed image. Resolution progressive: First encode a lower image resolution; then encode the difference to higher resolutions. Component progressive: First encode grey-scale version; then adding full color. Region of interest coding. Certain parts of the image are encoded with higher quality than others. This may be combined with scalability (encode these parts first, others later). Meta information. Compressed data may contain information about the image which may be used to categorize, search, or browse images. Such information may include color and texture statistics, small preview images, and author or copyright information. Processing power. Compression algorithms require different amounts of processing power to encode and decode. Some high compression algorithms require high processing power. The quality of a compression method often is measured by the peak signal-to-noise ratio. It measures the amount of noise introduced through a lossy compression of the image, however, the subjective judgment of the viewer also is regarded as an important measure, perhaps, being the most important measure.

… excerpt ends here. Continue reading the full article.

Illustrations

Image compression: Comparison of JPEG images saved by Adobe Photoshop at different quality levels and with or without "save for web"
Comparison of JPEG images saved by Adobe Photoshop at different quality levels and with or without "save for web"
Image compression: An example of image exporting targeting lossy compression processes of the sort commonly imposed on all files by social media websites. Pixel art of small dimensions, when scaled by multiples of 8×, produces much less visible compression artifacts after being converted to the JPEG file format, even at higher degrees of compression. The example images are, from left to right, scaled by 8× at 80% quality, 10× at 80% quality (producing much heavier artifacting) and 16× at 20% quality. The original pixels can be seen on the top left.
An example of image exporting targeting lossy compression processes of the sort commonly imposed on all files by social media websites. Pixel art of small dimensions, when scaled by multiples of 8×, produces much less visible compression artifacts after being converted to the JPEG file format, even at higher degrees of compression. The example images are, from left to right, scaled by 8× at 80% quality, 10× at 80% quality (producing much heavier artifacting) and 16× at 20% quality. The original pixels can be seen on the top left.

Worked examples

Example 1 — a first encounter with Image compression

Start with the simplest possible case. Write down what Image compression claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Image compression before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Image compression ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Image compression

In research
Image compression appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Image compression in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Image compression is common in secondary-school and first-year university syllabi. It links to neighbouring topics Data compression, Image compression, so understanding it makes those chapters shorter.
In everyday life
Look for Image compression outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Image compression in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Image compression means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Image compression out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Image compression in simple terms?

Image compression is a type of data compression applied to digital images, to reduce their cost for storage or transmission. Algorithms may take advantage of visual perception and the statistical properties of image data to provide superior results compared with generic data compression methods whi…

Why does Image compression matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Image compression?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Image compression.

Tags

  • Data compression
  • Image compression

Keep exploring