A robot inspection archive can decode a JPEG into exactly the same width and height as its source while retaining different pixel values. Dimension agreement describes the reconstructed grid. It does not establish that the source samples survived compression unchanged.

For a lossy DCT-based JPEG path, coefficient quantization supplies a concrete mechanism: several different transform values can map to one stored quantized value. A decoder receives that value and its quantization step, rather than the discarded distinction.

The examples here use original ideal grayscale blocks and mathematical transform operations. They are not files produced by a camera or codec, and no JPEG library was executed.

Limit the coding process being discussed

JPEG names a family with several coding processes. This discussion concerns an idealized eight-bit grayscale, eight-by-eight-block DCT path with scalar coefficient quantization. It does not describe every JPEG-related format or a lossless coding mode.

Assume one grayscale component, no resizing, no color conversion, and no component subsampling. The two source blocks each contain eight rows and eight columns, or sixty-four samples. Their dimensions remain fixed throughout the constructed model.

Recommendation T.81 defines the ideal forward and inverse DCT relationships and coefficient quantization in Annex A. The official libjpeg-turbo library documentation separately describes image dimensions and how a quality setting constructs quantization tables. Those references establish the operations; all block values and step sizes below are independently chosen.

Transform a constant source block

Let block A contain the integer grayscale value 160 at every position. For the eight-bit example, subtract 128 before the transform, so every level-shifted sample is 32.

Under the ideal JPEG DCT normalization, a constant block has one nonzero coefficient: the DC term. Its value is eight times the constant level-shifted sample. Thus block A has DC coefficient 256, with all sixty-three AC coefficients zero.

This result can also be checked from the DC formula: one-eighth of the sum of the sixty-four level-shifted samples equals 64 times 32 divided by eight, or 256.

Define block B to contain 161 at every position. Its level-shifted samples are 33, so its DC coefficient is 264, again with every AC coefficient zero.

The two source images therefore differ at all sixty-four samples, even though their dimensions and constant spatial structure match. The transform retains that difference before quantization.

Quantize both DC values with one chosen step

For this original model, choose a DC quantization step Q = 10. Quantize a coefficient S by rounding S/Q to the nearest integer. Neither value below is a half-integer, so no tie-breaking convention is needed.

For block A, 256/10 = 25.6, which rounds to 26. For block B, 264/10 = 26.4, which also rounds to 26.

All zero AC coefficients remain zero under any declared positive quantization steps. Consequently, the two blocks now have the same array of quantized coefficients: DC 26 and sixty-three zeros.

This is an explicit many-to-one operation. A decoder receiving that coefficient array and the same quantization table cannot tell whether the original constant block was A or B from that information alone.

The example does not claim a particular real encoder produces bit-identical files for those source images. Actual forward-transform implementations, headers, and coding choices can differ. It isolates the information loss of the stated ideal coefficient quantizer.

Dequantization chooses a representative coefficient

Dequantization multiplies the stored value by its step. Both example blocks therefore reconstruct a DC coefficient of 26 times 10 = 260.

The ideal inverse DCT of a DC-only block gives a constant level-shifted value equal to DC divided by eight. Here that is 32.5. Adding the level shift back gives 160.5 at every location before final integer-sample rounding.

A real integer output path must round and possibly clamp samples according to its implementation. The precise integer chosen at this half-integer is not needed for the argument. One common reconstructed result cannot equal both distinct original blocks.

The array still contains eight rows and eight columns. Restoring the grid has not restored the source distinction merged by quantization.

Coefficient steps have local numerical meaning

For nearest-integer quantization with positive step Q, the ideal coefficient reconstruction error has magnitude at most Q/2, with boundary details depending on rounding ties. In this example the original DC values differ from 260 by −4 and +4, each within the five-unit half-step.

For a constant block, a DC error of four corresponds to a uniform level-shifted sample difference of one-half before integer rounding, because the DC-only inverse divides by eight.

A general image block can have many nonzero AC coefficients. Quantizing them changes spatial variations through the inverse transform. A coefficient-domain half-step bound is not automatically a bound of the same size on every output pixel; multiple basis contributions combine at each position.

The invented DC calculation therefore explains a simple loss mechanism without predicting artifact severity for textures, edges, or robot inspection features.

Quality and dimensions are separate settings

The libjpeg-turbo documentation describes jpeg_set_quality as constructing quantization tables from a user-facing scale and notes that the mapping can change. A quality number is consequently not a direct declaration that a fixed percentage of source pixel information survives.

Image width and height are specified separately. Changing quantization need not resize the image. Conversely, a separate resize operation changes the grid even if the compression stage itself is configured differently.

The resulting file size also depends on image content and coding choices. No compressed byte count or robot vision accuracy follows from the two constant blocks alone.

For robot image records, preserving the acquisition source, processing history, coding mode, dimensions, and relevant compression parameters makes comparisons interpretable. Matching dimensions confirms the same grid shape; verifying sample preservation requires evidence about the values and the transformations applied to them.

Sources checked October 23, 2026

CCITT Recommendation T.81, September 1992, Digital compression and coding of continuous-tone still images, Annex A.3.3 and A.3.4, original document hosted by W3C:

https://www.w3.org/Graphics/JPEG/itu-t81.pdf

libjpeg-turbo, USING THE IJG JPEG LIBRARY, official maintained documentation, main branch as accessed:

https://raw.githubusercontent.com/libjpeg-turbo/libjpeg-turbo/main/doc/libjpeg.txt

All blocks, step sizes, and coefficient calculations are original ideal constructions. No source figure, quantization table, camera image, or codec result is reproduced.

Illustration note: The site-library robot over a bin of metallic parts is a concept illustration. It does not show either constructed block or document a measured JPEG compression effect.