1992
Ordinary JPEG compression saves space by discarding image information.
6 min readLast updated
Photo: Cburnett · CC BY-SA 3.0
The short answer
Ordinary JPEG compression makes image files smaller partly by discarding information. The result may look very close to the original, but decoding generally does not recover exactly the same pixel values.
Why it's true
Lossy compression trades numerical fidelity for storage and transmission efficiency. That trade can be valuable for photographs containing millions of pixels, where a substantial reduction in file size may produce little visible difference at the intended viewing size.
A JPEG quality control changes how aggressively the encoder simplifies image information. Lower settings usually reduce file size and increase visible damage, while higher settings usually retain more detail. Quality scales are not standardized across every application, so matching numbers do not guarantee matching results.
The trade becomes more obvious around sharp text, high contrast edges, and fine patterns. Compression can create ringing, block boundaries, or softened detail. These artifacts explain why a format that works well for a photograph may be a poor choice for a screenshot or logo.
By the numbers
1992
Standard introduction
.jpg
Common extension
Lossy
Common compression method
The backstory
The JPEG standard dates to 1992, and its name comes from the Joint Photographic Experts Group. It became widely used for digital photographs because comparatively small files were easier to store, transmit, and display across computers and networks with limited resources.
In the common baseline workflow, an encoder separates the image into components and processes blocks containing eight by eight samples. A mathematical transform describes each block in terms of spatial frequencies. Quantization then rounds those transformed values, discarding precision that the decoder cannot recover. Further coding compresses the resulting representation efficiently.
Many encoders also reduce color detail through chroma subsampling. Human vision often notices fine brightness changes more readily than equally fine color changes, so storing color at lower resolution can save space with a relatively modest perceptual effect. Nevertheless, colorful text and crisp graphics can reveal that reduction clearly.
The wider picture
Not every operation involving a JPEG causes another quality loss. Simply copying or renaming the file leaves its image data unchanged. Reopening an image to view it is also harmless. The risk arises when software decodes the image and then saves it through another lossy encoding step, especially after edits.
The wording "ordinary JPEG" matters because the wider JPEG standards family includes lossless methods and other coding systems. The familiar photographic files produced by common camera and web workflows usually use lossy encoding. Even a maximum quality setting should not be treated as a universal guarantee of pixel perfect reconstruction.
A practical workflow keeps an original or a lossless editing master and produces JPEG delivery copies as needed. Judge those copies at their actual display size, including detailed areas and smooth gradients. This approach avoids repeatedly editing an already compressed delivery file while still benefiting from efficient distribution.
Worth remembering
- Ordinary JPEG achieves useful size reductions by accepting information loss, not merely by packing identical pixels more efficiently.
- Choose quality settings through visual comparison and file size testing rather than relying on a universal quality number.
- Keep a suitable master file when future editing or exact preservation matters, then export JPEG copies for delivery.
In context
JPEG’s usefulness comes from a tradeoff, not a promise of exact reconstruction. PNG preserves supplied image samples, while ordinary photographic JPEG aims for compact files with acceptable visual changes. The right choice therefore depends on the image and intended workflow, rather than a universal ranking of one format as better.
A closer look
Why repeated edits deserve attention
Opening an image for viewing is not the same as encoding it again. Saving a newly encoded lossy version can introduce additional changes, especially after editing. An editing master in a lossless format helps separate creative work from delivery compression. This does not make JPEG unsuitable for photographs; it identifies the stage where irreversible choices are being made.
Sharp edges reveal different weaknesses
Text and simple graphics can make compression artifacts conspicuous because they contain abrupt boundaries and flat areas. A photograph may conceal comparable numerical differences within texture. Judging suitability therefore requires looking at the actual subject, not just file size. A quality setting is a practical encoder control, not an independent guarantee that every image retains the same visible detail.
Related facts
PNG provides a useful comparison when exact image samples need to be preserved. PNG compression can preserve every original pixel value.
GIF shows how palette choices and compression can impose different kinds of limits. A GIF image palette holds at most 256 colors.
A related history explains why the first YouTube video was filmed at a zoo. The first video ever uploaded to YouTube was 19 seconds long, at a zoo.
This companion article explores A standard single-layer DVD holds 4.7 billion bytes, not 4.7 binary gigabytes. A standard single-layer DVD holds 4.7 billion bytes, not 4.7 binary gigabytes.
Key terms
- Quantization
- Rounding transformed image values to reduce stored precision in ordinary lossy JPEG encoding.
- Artifact
- A visible change introduced by processing or compression rather than an intended feature of the original image.
People also ask
Does every JPEG save visibly damage an image?
Not necessarily. The effect depends on settings, content, and previous compression. A high quality save may introduce changes too small to notice, but absence of obvious damage is not proof that the decoded pixels remain identical.
Why does JPEG sometimes make text look fuzzy?
Sharp lettering contains abrupt transitions that can be difficult to retain under aggressive quantization and color subsampling. Artifacts around letter edges can become conspicuous even when nearby photographic areas still look acceptable. Lossless graphics formats often handle such content better.
Can JPEG compression be reversed?
A decoder can reconstruct an image from the stored data, but it cannot uniquely recover values removed during lossy encoding. Enhancement software may estimate plausible detail, yet an estimate is not the same as restoring the original information.
Does merely viewing a JPEG recompress it?
No. Viewing decodes the stored file. Creating and saving a newly encoded version is the step that can add another lossy change.
Is JPEG always the smallest useful choice?
No. Image content and quality requirements matter. Sharp graphics may be better suited to a lossless format, while photographs often benefit from JPEG’s tradeoff.