The ubiquitous JPEG image format is particularly useful for delivery and distribution of images. In today’s post, we look at the details of the format.
The JPEG format was created by the Joint Photographic Experts Group as a standardized format for digital image files in 1986. It is the most commonly used digital image format--offering good compression and unparalleled support across all platforms. JPEG is primarily an encoding format, used to specify how to turn an image into numbers, and how to compress the bits effectively. JPEG also offers some container features--such as the ability to add metadata--but this is pretty limited.
As one of the oldest image standards, the JPEG format enjoys extremely wide support. Almost every digital camera can create JPEG formatted files, and JPEGs comprise the vast majority of image files on the web.
Supported color models
Most JPEG files are saved in some flavor of RGB color, typically in the sRGB color space. JPEGs can also be saved as grayscale images. JPEGs can be used for CMYK file delivery. The JPEG format does not support bit depth greater than 8-bit.
Image compression was a primary goal of the original JPEG standard, and multiple levels of compression are supported. They may be represented as “low, medium and high quality” or as a percentage scale, or as a scale from 1 to 10 or 1 to 12. At the highest levels of compression (smallest files), the resulting images are highly artifacted. At the lowest levels of compression, JPEG files are essentially lossless. JPEG compression works most effectively on images without a lot of fine detail. When a lot of detail is present, larger files are produced for any given compression setting. A file size saving on 10:1 is typically possible without sacrificing noticeable detail.
Support for additional components
Official support for additional components is very limited and officially includes metadata and color profile. JPEGs don’t even support alpha channels. Taken together, these limitations mean that JPEG is unsuitable as a rich media format and is really only suited for basic digital photographic images.
Warning : Resaving lossy JPEGs throws away information
Every time you resave a JPEG file with lossy compression, you throw away image data. If the quality level you are using is very high, then it might not be noticeable. But if you are using a medium quality or lower setting, you can produce significant degradation in some images after just a few saves. This continual loss of quality upon lossy resaves makes JPEG a poor choice for an image editing format when working in Photoshop or other program that requires resaving the original file.
When working in a read-only parametric image editor like Lightroom, a high-quality JPEG file can be a perfectly acceptable source image file, especially if it is the original JPEG produced by your camera.
Best uses for JPEG files
PDF, web and other electronic publication
Due to high levels of support, JPEG files are excellent choices for on-screen display.
Delivery of 8-bit images
When sending simple image files to another person, JPEG is usually a highly appropriate delivery format. Unless one of the more exotic flavors is used, like CMYK, or perhaps the JPEG 2000 format, JPEGs are the most dependably accessible format for images. When saved with lossless (or nearly lossless) compression, they provide extremely high quality.
Most cameras allow capture in JPEG format. To create the JPEG, information from the raw capture must be discarded, so it is inherently lossy as a capture format. However, if exposure and color balance are properly set, the resulting JPEG may provide a perfectly acceptable file for nearly every purpose, compared to a raw file. Capture should be done at the largest size and quality setting that is practical. JPEG cannot contain depth information or multi-frame captures, so it is not a suitable format for capture when that information is desirable.
Library originals for read-only image applications
Camera-created JPEGs as described above make an acceptable format for archiving when used in a strict read-only workflow.
In the year 2000, the JPEG committee created an update to the JPEG specification which offered several improvements to the original standard. JPEG 2000 increased support for bit depth of 16 and 32 bits per channel. JPEG 2000 also modernized the compression algorithm, increasing efficiency and making a lossless version a universal part of the standard along with several other modernizations.
Adoption of the JPEG 2000 standard was originally hampered by uncertainties in the patent rights to certain features. While those patents are probably not at issue any longer, they prevented the use of the format at the time when it was most opportune. No cameras capture in JPEG 2000, and software support for the format is limited. Now that image objects are growing more complex, and as storage efficiency becomes less important, other formats offer some clear advantages over JPEG 2000. (TIFF is more capable as a full-service container, DNG is a better container for camera raw data and for some archived data, JPEG and PNG are better formats for electronic publication due to wider support, HEIF supports complex image objects, etc.) JPEG 2000 does have some significant adoption in the library and cultural heritage sectors. The high bit-depth and lossless compression made it a good choice in the early 2000s, particularly for institutions where adequate storage for TIFF files presented a financial challenge.
In the next post, we take a look at PNG, a more modern format designed for use on the internet.