What causes jpeg artifacts

Content on WhatAnswers is provided "as is" for informational purposes. While we strive for accuracy, we make no guarantees. Content is AI-assisted and should not be used as professional advice.

Last updated: April 4, 2026

Quick Answer: JPEG artifacts are visual distortions that appear in compressed JPEG images, primarily caused by the lossy compression algorithm used. This algorithm reduces file size by discarding some image data, which can lead to blockiness, banding, ringing, or blurriness, especially in areas with fine detail or sharp transitions.

Key Facts

What are JPEG Artifacts?

JPEG (Joint Photographic Experts Group) artifacts, often referred to as compression artifacts, are the undesirable visual distortions that can appear in digital images that have been compressed using the JPEG algorithm. The JPEG format is ubiquitous for storing and sharing photographs due to its ability to achieve substantial file size reduction while maintaining a visually acceptable level of quality for most purposes. However, this efficiency comes at a cost: the compression is 'lossy,' meaning that some image information is discarded during the compression process. These discarded details are what manifest as artifacts when the image is viewed or further processed.

How JPEG Compression Works (and Creates Artifacts)

Understanding JPEG artifacts requires a basic grasp of how the compression algorithm functions. The process generally involves several steps:

  1. Color Space Transformation: The image is typically converted from RGB (Red, Green, Blue) to a luminance (brightness) and chrominance (color) color space, like YCbCr. Human vision is less sensitive to color detail than brightness, so the chrominance channels are often downsampled (reduced in resolution), which is an early source of potential information loss.
  2. Discrete Cosine Transform (DCT): The image is divided into 8x8 pixel blocks. Each block is then transformed using the DCT. This mathematical operation converts the spatial information (pixel values) into frequency information, separating the block into different frequency components – from low frequencies (representing smooth areas) to high frequencies (representing sharp details and edges).
  3. Quantization: This is the primary step where lossy compression occurs. Each of the 64 DCT coefficients in an 8x8 block is divided by a corresponding value in a quantization table, and the result is rounded to the nearest integer. Higher quantization values lead to more coefficients being rounded to zero or smaller numbers, effectively discarding high-frequency information that contributes to fine details and sharp edges. This is the main culprit behind many JPEG artifacts. The level of compression is controlled by adjusting the values in this quantization table; higher compression means larger quantization values.
  4. Entropy Coding: The resulting quantized coefficients are then losslessly compressed using techniques like Huffman coding or arithmetic coding to further reduce the file size.

Common Types of JPEG Artifacts

The specific type of artifact depends on the nature of the image content and the degree of compression. Here are some of the most common:

Factors Influencing JPEG Artifacts

When are JPEG Artifacts Acceptable?

The JPEG format is designed for a balance between file size and visual fidelity. For web use, email attachments, and general photography where extreme detail isn't paramount, the artifacts introduced at moderate compression levels are often imperceptible or considered an acceptable trade-off for smaller file sizes. This allows for faster loading times on websites and reduced storage requirements. However, for professional applications like archival purposes, high-quality printing, or medical imaging, where every detail matters, lossless formats like TIFF or PNG, or uncompressed formats, are preferred.

Mitigating JPEG Artifacts

While artifacts are inherent to lossy compression, some steps can be taken:

In summary, JPEG artifacts are an unavoidable consequence of the lossy compression technique used by the JPEG format. They arise from the algorithm's decision to discard image data to achieve smaller file sizes, manifesting as blockiness, ringing, blurring, and banding. Understanding these artifacts helps users make informed decisions about when and how to use the JPEG format effectively.

Sources

  1. JPEG - WikipediaCC-BY-SA-4.0
  2. ITU-T Recommendation T.81: Information technology - Digital compression and coding of continuous-tone still images - Requirements and guidelinesfair-use

Missing an answer?

Suggest a question and we'll generate an answer for it.