ArticleslgStudy

computer science

JPEG

JPEG is a computer 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 JPEG rather than just read about it. In short: JPEG ( JAY-peg, short for Joint Photographic Experts Group and sometimes retroactively referred to as JPEG 1) is a commonly used method of lossy compression for digital images, particularly for those images produced by digital photography. The degree of compression can be adjusted, allowing a selectable trade off between storage size and image quality.

JPEG — main illustration
JPEG — illustration

Key takeaways

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

Reference excerpt

JPEG ( JAY-peg, short for Joint Photographic Experts Group and sometimes retroactively referred to as JPEG 1) is a commonly used method of lossy compression for digital images, particularly for those images produced by digital photography. The degree of compression can be adjusted, allowing a selectable trade off between storage size and image quality. JPEG typically achieves 10:1 compression with a loss in image quality that, while perceptible, is widely agreed upon to be acceptable. Since its introduction in 1992, JPEG has been the most widely used image compression standard in the world, and the most widely used digital image format, with several billion JPEG images produced every day as of 2015. The Joint Photographic Experts Group created the standard in 1992, based on the discrete cosine transform (DCT) algorithm. JPEG was largely responsible for the proliferation of digital images and digital photos across the Internet and later social media. JPEG compression is used in a number of image file formats. JPEG/Exif is the most common image format used by digital cameras and other photographic image capture devices; along with JPEG/JFIF, it is the most common format for storing and transmitting photographic images on the World Wide Web. These format variations are often not distinguished and are simply called JPEG. The MIME media type for JPEG is "image/jpeg", except in older Internet Explorer versions, which provide a MIME type of "image/pjpeg" when uploading JPEG images. JPEG files usually have a filename extension of "jpg" or "jpeg". JPEG/JFIF supports a maximum image size of 65,535×65,535 pixels, hence up to 4 gigapixels for an aspect ratio of 1:1. In 2000, the JPEG group introduced a format intended to be a successor, JPEG 2000, but it was unable to replace the original JPEG as the dominant image standard.

History

Background The original JPEG specification published in 1992 implements processes from various earlier research papers and patents cited by the CCITT (now ITU-T) and Joint Photographic Experts Group. The basis for JPEG's lossy compression algorithm is the discrete cosine transform (DCT), which was first proposed by Nasir Ahmed as an image compression technique in 1972. Ahmed published the DCT algorithm with T. Natarajan and K. R. Rao in a 1974 paper, which is cited in the JPEG specification. The JPEG specification cites patents from several companies. The following patents provided the basis for its arithmetic coding algorithm.

IBM U.S. patent 4,652,856 – 4 February 1986 – Kottappuram M. A. Mohiuddin and Jorma J. Rissanen – Multiplication-free multi-alphabet arithmetic code U.S. patent 4,905,297 – 27 February 1990 – G. Langdon, J. L. Mitchell, W. B. Pennebaker, and Jorma J. Rissanen – Arithmetic coding encoder and decoder system U.S. patent 4,935,882 – 19 June 1990 – W. B. Pennebaker and J. L. Mitchell – Probability adaptation for arithmetic coders Mitsubishi Electric JP H02202267 (1021672) – 21 January 1989 – Toshihiro Kimura, Shigenori Kino, Fumitaka Ono, Masayuki Yoshida – Coding system JP H03247123 (2-46275) – 26 February 1990 – Tomohiro Kimura, Shigenori Kino, Fumitaka Ono, and Masayuki Yoshida – Coding apparatus and coding method The JPEG specification also cites three other patents from IBM. Other companies cited as patent holders include AT&T (two patents) and Canon Inc. Absent from the list is U.S. patent 4,698,672, filed by Compression Labs' Wen-Hsiung Chen and Daniel J. Klenke in October 1986. The patent describes a DCT-based image compression algorithm, and would later be a cause of controversy in 2002 (see Patent controversy below). However, the JPEG specification did cite two earlier research papers by Wen-Hsiung Chen, published in 1977 and 1984.

JPEG standard "JPEG" stands for Joint Photographic Experts Group, the name of the committee that created the JPEG standard and other still picture coding standards. The "Joint" stood for ISO TC97 WG8 and CCITT SGVIII. Founded in 1986, the group developed the JPEG standard during the late 1980s. The group published the JPEG standard in 1992. In 1987, ISO TC 97 became ISO/IEC JTC 1 and, in 1992, CCITT became ITU-T. Currently on the JTC1 side, JPEG is one of two sub-groups of ISO/IEC Joint Technical Committee 1, Subcommittee 29, Working Group 1 (ISO/IEC JTC 1/SC 29/WG 1) – titled as Coding of still pictures. On the ITU-T side, ITU-T SG16 is the respective body. The original JPEG Group was organized in 1986, issuing the first JPEG standard in 1992, which was approved in September 1992 as ITU-T Recommendation T.81 and, in 1994, as ISO/IEC 10918-1. The JPEG standard specifies the codec, which defines how an image is compressed into a stream of bytes and decompressed back into an image, but not the file format used to contain that stream. The Exif and JFIF standards define the commonly used file formats for interchange of JPEG-compressed images. JPEG standards are formally named as Information technology – Digital compression and coding of continuous-tone still images. ISO/IEC 10918 consists of the following parts:

Ecma International TR/98 specifies the JPEG File Interchange Format (JFIF); the first edition was published in June 2009.

… excerpt ends here. Continue reading the full article.

Illustrations

JPEG illustration
JPEG illustration
JPEG: An example of JPEG scaling demonstrating the format's processing of images in blocks of 8×8 pixels. Images of small dimensions, when scaled by multiples of 8× and saved as JPEG files, produce much less visible compression artifacts, 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 JPEG scaling demonstrating the format's processing of images in blocks of 8×8 pixels. Images of small dimensions, when scaled by multiples of 8× and saved as JPEG files, produce much less visible compression artifacts, 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.
JPEG: The 8×8 sub-image shown in 8-bit grayscale
The 8×8 sub-image shown in 8-bit grayscale
JPEG: The DCT transforms an 8×8 block of input values to a linear combination of these 64 patterns. The patterns are referred to as the two-dimensional DCT basis functions, and the output values are referred to as transform coefficients. The horizontal index is 
  
    
      
        u
      
    
    {\displaystyle u}
  
 and the vertical index is 
  
    
      
        v
      
    
    {\displaystyle v}
  
.
The DCT transforms an 8×8 block of input values to a linear combination of these 64 patterns. The patterns are referred to as the two-dimensional DCT basis functions, and the output values are referred to as transform coefficients. The horizontal index is u {\displaystyle u} and the vertical index is v {\displaystyle v} .

Worked examples

Example 1 — a first encounter with JPEG

Start with the simplest possible case. Write down what JPEG claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer 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 JPEG 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 JPEG 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 JPEG

In research
JPEG appears in computer 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 JPEG 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
JPEG is common in secondary-school and first-year university syllabi. It links to neighbouring topics Computer-related introductions in 1992, Discovery and invention controversies, IEC standards, so understanding it makes those chapters shorter.
In everyday life
Look for JPEG 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 JPEG in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what JPEG 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 JPEG out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is JPEG in simple terms?

JPEG ( JAY-peg, short for Joint Photographic Experts Group and sometimes retroactively referred to as JPEG 1) is a commonly used method of lossy compression for digital images, particularly for those images produced by digital photography. The degree of compression can be adjusted, allowing a selec…

Why does JPEG matter?

Because it connects several computer 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 JPEG?

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 JPEG.

Tags

  • Computer-related introductions in 1992
  • Discovery and invention controversies
  • IEC standards
  • ISO standards
  • ITU-T recommendations
  • Image compression
  • JPEG
  • Lossy compression algorithms
  • Open formats
  • Raster graphics file formats

Keep exploring