Image compression

Short description: Reduction of image size to save storage and transmission costs

This article includes a list of general references, but it remains largely unverified because it lacks sufficient corresponding inline citations. Please help to improve this article by introducing more precise citations. (April 2010) (Learn how and when to remove this template message)

|

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.[1]

Comparison of JPEG images saved by Adobe Photoshop at different quality levels and with or without "save for web"

## Contents

* 1 Lossy and lossless image compression
* 2 Other properties
* 3 History
* 4 Uses
* 5 Notes and references

## 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.[2] 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[3] and Diffusion models.[4] Implementations are available in OpenCV, TensorFlow, MATLAB's Image Processing Toolbox (IPT), and the High-Fidelity Generative Image Compression (HiFiC) open source project.[5]

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.[6][7]
* 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.

## History

Entropy coding started in the late 1940s with the introduction of Shannon–Fano coding,[8] the basis for Huffman coding which was published in 1952.[9] Transform coding dates back to the late 1960s, with the introduction of fast Fourier transform (FFT) coding in 1968 and the Hadamard transform in 1969.[10]

An important development in image data compression was the discrete cosine transform (DCT), a lossy compression technique first proposed by Nasir Ahmed, T. Natarajan and K. R. Rao in 1973.[11] JPEG was introduced by the Joint Photographic Experts Group (JPEG) in 1992.[12] JPEG compresses images down to much smaller file sizes, and has become the most widely used image file format.[13] JPEG was largely responsible for the wide proliferation of digital images and digital photos,[14] with several billion JPEG images produced every day as of 2015.[15]

Lempel–Ziv–Welch (LZW) is a lossless compression algorithm developed by Abraham Lempel, Jacob Ziv and Terry Welch in 1984. It is used in the GIF format, introduced in 1987.[16] DEFLATE, a lossless compression algorithm developed by Phil Katz and specified in 1996, is used in the Portable Network Graphics (PNG) format.[17]

The JPEG 2000 standard was developed from 1997 to 2000 by a JPEG committee chaired by Touradj Ebrahimi (later the JPEG president).[18] In contrast to the DCT algorithm used by the original JPEG format, JPEG 2000 instead uses discrete wavelet transform (DWT) algorithms. It uses the CDF 9/7 wavelet transform (developed by Ingrid Daubechies in 1992) for its lossy compression algorithm,[19] and the Le Gall–Tabatabai (LGT) 5/3 wavelet transform[20][21] (developed by Didier Le Gall and Ali J. Tabatabai in 1988)[22] for its lossless compression algorithm.[19] JPEG 2000 technology, which includes the Motion JPEG 2000 extension, was selected as the video coding standard for digital cinema in 2004.[23]

## Uses

File:Jpg scaling example combined.pngAn 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.

Social media websites and instant messaging applications commonly apply lossy compression to all files uploaded to their services, in order to save costs on data storage. Digital artists, game developers, photographers and other visual media creators frequently need to learn approximations of the compression methods of specific platforms in order to share their work with clients and audiences, as details are rarely published.[24] Native file hosting is more commonly offered on websites centered around visual media, such as Cara or some archival boorus.

Facebook released Spectrum, a client-side image transcoding library, as an open-source project in 2018,[25] though by 2024 the project had been archived.[26] WhatsApp and Facebook Messenger released an option for HD image sharing in 2024, though commentators noted the feature would likely still not share media in native resolution.[27]

## Notes and references

1. ↑ "Image Data Compression". http://user.engineering.uiowa.edu/~dip/lecture/DataCompression.html.
2. ↑ Ahmed, N.; Natarajan, T.; Rao, K.R. (1974). "Discrete Cosine Transform". IEEE Transactions on Computers 100 (1): 90–93. doi:10.1109/T-C.1974.223784. Bibcode: 1974ITCmp.100...90A. http://dasan.sejong.ac.kr/~dihan/dip/p5_DCT.pdf.
3. ↑ "AI-Based Image Compression: The State of the Art". Nov 24, 2021. https://towardsdatascience.com/ai-based-image-compression-the-state-of-the-art-fb5aa6042bfa.
4. ↑ Bühlmann, Matthias (2022-09-28). "Stable Diffusion Based Image Compression" (in en). https://pub.towardsai.net/stable-diffusion-based-image-compresssion-6f1f0a399202.
5. ↑ "High-Fidelity Generative Image Compression". https://hific.github.io/.
6. ↑ Burt, P.; Adelson, E. (1 April 1983). "The Laplacian Pyramid as a Compact Image Code". IEEE Transactions on Communications 31 (4): 532–540. doi:10.1109/TCOM.1983.1095851. Bibcode: 1983ITCom..31..532B.
7. ↑ Shao, Dan; Kropatsch, Walter G. (February 3–5, 2010). Špaček, Libor; Franc, Vojtěch. eds. "Irregular Laplacian Graph Pyramid". Computer Vision Winter Workshop 2010 (Nové Hrady, Czech Republic: Czech Pattern Recognition Society). http://www.prip.tuwien.ac.at/twist/docs/irregularLaplacian.pdf.
8. ↑ Claude Elwood Shannon (1948). "A Mathematical Theory of Communication". Bell System Technical Journal 27 (3–4): 379–423, 623–656. doi:10.1002/j.1538-7305.1948.tb01338.x. Bibcode: 1948BSTJ...27..379S. http://www.math.harvard.edu/~ctm/home/text/others/shannon/entropy/entropy.pdf. Retrieved 2019-04-21.
9. ↑ David Albert Huffman (September 1952), "A method for the construction of minimum-redundancy codes", Proceedings of the IRE 40 (9): 1098–1101, doi:10.1109/JRPROC.1952.273898, Bibcode: 1952PIRE...40.1098H, http://compression.ru/download/articles/huff/huffman_1952_minimum-redundancy-codes.pdf
10. ↑ Pratt, W.K.; Kane, J.; Andrews, H.C. (1969). "Hadamard transform image coding". Proceedings of the IEEE 57 (1): 58–68. doi:10.1109/PROC.1969.6869. Bibcode: 1969IEEEP..57...58P.
11. ↑ Ahmed, Nasir (January 1991). "How I Came Up With the Discrete Cosine Transform". Digital Signal Processing 1 (1): 4–5. doi:10.1016/1051-2004(91)90086-Z. Bibcode: 1991DSP.....1....4A. https://www.scribd.com/doc/52879771/DCT-History-How-I-Came-Up-with-the-Discrete-Cosine-Transform.
12. ↑ "T.81 – DIGITAL COMPRESSION AND CODING OF CONTINUOUS-TONE STILL IMAGES – REQUIREMENTS AND GUIDELINES". CCITT. September 1992. https://www.w3.org/Graphics/JPEG/itu-t81.pdf.
13. ↑ "The JPEG image format explained". BT Group. 31 May 2018. https://home.bt.com/tech-gadgets/photography/what-is-a-jpeg-11364206889349.
14. ↑ "What Is a JPEG? The Invisible Object You See Every Day". 24 September 2013. https://www.theatlantic.com/technology/archive/2013/09/what-is-a-jpeg-the-invisible-object-you-see-every-day/279954/.
15. ↑ Baraniuk, Chris (15 October 2015). "Copy protections could come to JPEGs". BBC News. BBC. https://www.bbc.co.uk/news/technology-34538705.
16. ↑ "The GIF Controversy: A Software Developer's Perspective". 27 January 1995. https://mike.pub/19950127-gif-lzw.
17. ↑ L. Peter Deutsch (May 1996), DEFLATE Compressed Data Format Specification version 1.3, IETF, p. 1. sec. Abstract, doi:10.17487/RFC1951, RFC 1951, https://tools.ietf.org/html/rfc1951#section-Abstract, retrieved 2014-04-23
18. ↑ Taubman, David; Marcellin, Michael (2012). JPEG2000 Image Compression Fundamentals, Standards and Practice: Image Compression Fundamentals, Standards and Practice. Springer Science & Business Media. ISBN 9781461507994. https://books.google.com/books?id=y7HeBwAAQBAJ&pg=PA402.
19. ↑ 19.0 19.1 Unser, M.; Blu, T. (2003). "Mathematical properties of the JPEG2000 wavelet filters". IEEE Transactions on Image Processing 12 (9): 1080–1090. doi:10.1109/TIP.2003.812329. PMID 18237979. Bibcode: 2003ITIP...12.1080U. https://pdfs.semanticscholar.org/6ed4/dece8b364416d9c390ba53df913bca7fb9a6.pdf.
20. ↑ Sullivan, Gary (8–12 December 2003). "General characteristics and design considerations for temporal subband video coding". Video Coding Experts Group. https://www.itu.int/wftp3/av-arch/video-site/0312_Wai/VCEG-U06.doc.
21. ↑ Bovik, Alan C. (2009). The Essential Guide to Video Processing. Academic Press. p. 355. ISBN 9780080922508. https://books.google.com/books?id=wXmSPPB_c_0C&pg=PA355.
22. ↑ Le Gall, Didier; Tabatabai, Ali J. (1988). "Sub-band coding of digital images using symmetric short kernel filters and arithmetic coding techniques". ICASSP-88., International Conference on Acoustics, Speech, and Signal Processing. pp. 761–764 vol.2. doi:10.1109/ICASSP.1988.196696.
23. ↑ Swartz, Charles S. (2005). Understanding Digital Cinema: A Professional Handbook. Taylor & Francis. p. 147. ISBN 9780240806174. https://books.google.com/books?id=tYw3ehoBnjkC&pg=PA147.
24. ↑ Nield, David (2026-02-04). "Messenger Apps Are Compressing Your Files, but There's a Workaround" (in en). https://lifehacker.com/tech/your-messenger-apps-are-compressing-your-files-but-there-is-a-workaround.
25. ↑ Moon, Mariella (2019-01-17). "Facebook makes its image compression tech available to all" (in en-US). https://www.engadget.com/2019-01-17-facebook-image-compression-tool-open-source.html.
26. ↑ "facebookincubator/spectrum", Github (Meta Incubator), 2026-07-01, https://github.com/facebookincubator/spectrum, retrieved 2026-07-24
27. ↑ Mathur, Chandraveer (2024-04-10). "Facebook Messenger introduces HD photo sharing months after WhatsApp" (in en). https://www.androidpolice.com/messenger-launches-hd-photo-sharing/.

* v
* t
* e

Data compression methods

Lossless|

| Entropy type|

* Arithmetic
* Asymmetric numeral systems
* Golomb
* Huffman
* Adaptive
* Canonical
* Modified
* Range
* Shannon
* Shannon–Fano
* Shannon–Fano–Elias
* Tunstall
* Unary
* Universal
* Exp-Golomb
* Fibonacci
* Gamma
* Levenshtein

|

Dictionary type|

* Byte pair encoding
* Lempel–Ziv
* Brotli
* DEFLATE
* LZ4
* LZFSE
* LZJB
* LZMA
* LZO
* LZRW
* LZS
* LZSS
* LZW
* LZWL
* LZX
* Snappy
* Zstandard

Other types|

* BWT
* CTW
* Delta
* DMC
* DPCM
* LDCT
* MTF
* PAQ
* PPM
* RLE

Lossy|

| Transform type|

* Discrete cosine transform
* DCT
* MDCT
* DST
* FFT
* Wavelet
* Daubechies
* DWT
* SPIHT

|

Predictive type|

* DPCM
* ADPCM
* LPC
* ACELP
* CELP
* LAR
* LSP
* WLPC
* Motion
* Compensation
* Estimation
* Vector
* Psychoacoustic

Audio|

| Concepts|

* Bit rate
* ABR
* CBR
* VBR
* Companding
* Convolution
* Dynamic range
* Latency
* Nyquist–Shannon theorem
* Sampling
* Sound quality
* Speech coding
* Sub-band coding

|

Codec parts|

* A-law
* μ-law
* DPCM
* ADPCM
* FT
* FFT
* LPC
* ACELP
* CELP
* LAR
* LSP
* WLPC
* MDCT
* Psychoacoustic model

Image|

| Concepts|

* Chroma subsampling
* Coding tree unit
* Color space
* Compression artifact
* Image resolution
* Macroblock
* Pixel
* PSNR
* Quantization
* Standard test image

|

Methods|

* Chain code
* DCT
* DEFLATE
* Fractal
* KLT
* LP
* RLE
* Wavelet
* Daubechies
* DWT
* EZW
* SPIHT

Video|

| Concepts|

* Bit rate
* ABR
* CBR
* VBR
* Display resolution
* Frame
* Frame rate
* Frame types
* Interlace
* Video characteristics
* Video quality

|

Codec parts|

* DCT
* DPCM
* Deblocking filter
* Lapped transform
* Motion
* Compensation
* Estimation
* Vector
* Wavelet
* Daubechies
* DWT

Theory|

* Entropy
* Information theory
* Timeline
* Kolmogorov complexity
* Quantization
* Rate–distortion
* Redundancy

* Compression formats
* Compression software (codecs)

* v
* t
* e

Multimedia compression and container formats

Video
compression|

| ISO, IEC, MPEG|

* MJPEG
* Motion JPEG 2000
* MPEG-1
* MPEG-2
* Part 2
* MPEG-4
* Part 2 / ASP
* Part 10 / AVC
* MPEG-H
* Part 2 / HEVC
* MPEG-I
* Part 3 / VVC

|

ITU-T, VCEG|

* H.120
* DCT
* H.261
* H.262
* H.263
* H.264 / AVC
* H.265 / HEVC
* H.266 / VVC
* DV

SMPTE|

* VC-1
* VC-2
* VC-3
* VC-5

TrueMotion|

* TrueMotion S
* DCT
* VP3
* VP6
* VP7
* VP8
* VP9
* AV1

Others|

* Apple Video
* AVS
* Bink
* Cinepak
* Daala
* DVI
* EVC
* FFV1
* Huffyuv
* Indeo
* Lagarith
* Microsoft Video 1
* MSU Lossless
* OMS Video
* Pixlet
* ProRes 422
* ProRes 4444
* QuickTime
* Animation
* Graphics
* RealVideo
* RTVideo
* SheerVideo
* Smacker
* Sorenson Video/Spark
* Theora
* Thor
* WMV
* XEB
* YULS

Audio
compression|

| ISO, IEC, MPEG|

* MPEG-1 Layer II
* Multichannel
* MPEG-1 Layer I
* MPEG-1 Layer III (MP3)
* AAC
* HE-AAC
* AAC-LD
* MPEG Surround
* MPEG-4 ALS
* MPEG-4 SLS
* MPEG-4 DST
* MPEG-4 HVXC
* MPEG-4 CELP
* MPEG-D USAC
* MPEG-H 3D Audio

|

ITU-T|

* G.711
* A-law
* µ-law
* G.718
* G.719
* G.722
* G.722.1
* G.722.2
* G.723
* G.723.1
* G.726
* G.728
* G.729
* G.729.1

IETF|

* Opus
* iLBC
* Speex
* Vorbis

3GPP|

* AMR
* AMR-WB
* AMR-WB+
* EVRC
* EVRC-B
* EVS
* GSM-HR
* GSM-FR
* GSM-EFR

ETSI|

* AC-3
* AC-4
* DTS

Others|

* ACELP
* ALAC
* Asao
* ATRAC
* AVS
* CELT
* Codec 2
* DRA
* FLAC
* iSAC
* Monkey's Audio
* TTA
* True Audio
* MT9
* Musepack
* OptimFROG
* OSQ
* QCELP
* RCELP
* RealAudio
* RTAudio
* SD2
* SHN
* SILK
* Siren
* SMV
* SVOPC
* TwinVQ
* VMR-WB
* VSELP
* WavPack
* WMA
* MQA
* aptX
* aptX HD
* aptX Low Latency
* aptX Adaptive
* LDAC
* LHDC
* LLAC

Image
compression|

| IEC, ISO,
IETF, W3C,
ITU-T, JPEG|

* CCITT Group 4
* DCT
* HEIF
* HEVC
* JPEG
* JPEG XR
* JPEG XT
* TIFF/EP
* Arithmetic
* JBIG
* JBIG2
* JPEG-LS
* JPEG 2000
* LZ
* GIF
* PNG
* TIFF
* TIFF/IT

|

Others|

* APNG
* BPG
* DjVu
* EXR
* FLIF
* ICER
* MNG
* PGF
* QTVR
* WBMP
* WebP

Containers|

| ISO, IEC|

* MPEG-ES
* MPEG-PES
* MPEG-PS
* MPEG-TS
* ISO base media file format
* MPEG-4 Part 14 (MP4)
* Motion JPEG 2000
* MPEG-21 Part 9
* MPEG media transport

|

ITU-T|

* H.222.0
* T.802

IETF|

* RTP
* Ogg

SMPTE|

* GXF
* MXF

Others|

* 3GP and 3G2
* AMV
* ASF
* AIFF
* AVI
* AU
* BPG
* Bink
* Smacker
* BMP
* DivX Media Format
* EVO
* Flash Video
* IFF
* M2TS
* Matroska
* WebM
* QuickTime File Format
* RatDVD
* RealMedia
* RIFF
* WAV
* MOD and TOD
* VOB, IFO and BUP

Collaborations|

* NETVC
* MPEG LA
* HEVC Advance

Methods|

* Discrete cosine transform
* DCT
* MDCT
* Entropy
* Arithmetic
* Huffman
* Modified
* FFT
* LPC
* ACELP
* CELP
* LSP
* WLPC
* Lossless
* Lossy
* LZ
* DEFLATE
* LZW
* PCM
* A-law
* µ-law
* ADPCM
* DPCM
* Transform
* Wavelet
* Daubechies
* DWT
* Transform

Lists|

* Comparison of audio coding formats
* Comparison of video codecs
* List of codecs

See Compression methods for techniques and Compression software for codecs

0.00

(0 votes)

Original source: https://en.wikipedia.org/wiki/Image compression. Read more

|

Retrieved from "https://handwiki.org/wiki/index.php?title=Image_compression&oldid=4569143"
*[v]: View this template
*[t]: Discuss this template
*[e]: Edit this template