What Happens When You Repeatedly Save a JPEG?

Repeatedly editing and saving an image in JPEG format causes continuous generation loss, progressively altering and degrading the underlying pixel values. Because JPEG relies on lossy compression, each save cycle discards subtle color and detail data through mathematical approximations. Over multiple generations, this process shifts numerical RGB values, introduces visible compression artifacts, blurs fine textures, and permanently reduces the fidelity of the image.

The JPEG Compression Pipeline

To understand how pixel values change, it is necessary to examine what happens during every save operation:

  1. Color Space Transformation: The image is converted from RGB to YCbCr, separating luminance (brightness, \(Y\)) from chrominance (color, \(Cb\) and \(Cr\)). The human eye is more sensitive to brightness than color, so the color channels are often downsampled (chroma subsampling), which immediately averages and permanently alters the color values of neighboring pixels.
  2. Discrete Cosine Transform (DCT): The image is divided into \(8\times8\) pixel blocks. A DCT is applied to each block, converting spatial pixel values into frequency components (low-frequency flat areas versus high-frequency edges and fine details).
  3. Quantization: This is the strictly lossy step. The frequency components are divided by values in a quantization matrix and rounded to the nearest integer. High-frequency details are rounded down to zero, deleting them entirely.
  4. Encoding: The remaining values are compressed losslessly into the final file.

How Pixel Values Change During Repeated Saves

When a saved JPEG is reopened, the computer reconstructs the pixels from the quantized frequency data. If the file is saved again, the cycle repeats. This leads to distinct changes in pixel values:

The Impact of Editing and Alignment

The severity of pixel degradation depends significantly on whether modifications shift the pixel grid. If an image is simply opened and re-saved without changes at the exact same quality setting, pixel value drift eventually plateaus after several cycles because the values already align with the quantization matrix.

However, if an image is cropped, rotated, resized, or shifted, the original \(8\times8\) block alignment is disrupted. The compression algorithm is forced to slice the image into entirely new \(8\times8\) grids. This treats previous compression artifacts as new image data, recalculating DCT frequencies from scratch and accelerating pixel degradation exponentially.

Preventing Pixel Degradation

To preserve exact pixel values throughout an editing workflow, images should be stored in lossless formats such as PNG, TIFF, or native working files (such as PSD) during production. JPEG compression should only be applied once as the final export step.