Contrast Proof is a set of Python tools aimed at analyzing the tonal response of photographic and fine art printing papers. Its objective is to relate the actually measured characteristic curve of a substrate with the tonal content of an image, to identify which parts of the photograph may lose differentiation, compress, or fall outside the useful reproduction range.
A print proof does not depend solely on the file being correctly edited or the existence of an ICC profile. The paper, ink, printing mode, and the relationship between the image values and the obtained density determine how much detail is preserved in shadows, midtones, and highlights. Contrast Proof allows studying this relationship based on measurement data, rather than relying only on the subjective appearance of a copy.
From the paper curve to the photograph histogram
The main tool, contrast_proof.py, reads a CGATS file with measurements of the printed scale—including visible density and L* values—and a TIFF, JPEG, or PNG image. From these two elements, it plots the measured density curve of the paper over the image histogram. This makes it possible to verify which tonal areas of a photograph lie in regions where the paper preserves local contrast and which approach a shadow plateau or a highlight limit.

The graph is not limited to showing a generic curve. The input scale is linked to the image count values and density is treated as the logarithmic magnitude it is. This makes tonal compressions visible that might go unnoticed if only a linear level scale is examined. To aid interpretation, the program can also display the measured L* curve and present the vertical axis as optical density or relative luminance.
Detection of detail loss and perceptible contrast
Contrast Proof incorporates two models to analyze the local contrast of the curve: one based on density gain and another expressing tonal change through DICOM JND units. The latter allows establishing a perceptual criterion to assess when two close tones cease to provide a visible difference under the considered luminance conditions. Thresholds, decision rules, and the number of consecutive patches required to declare a clipping zone can be adjusted to the case study.
The result identifies the practical limits of shadows and highlights, estimates the maximum useful density, and quantifies what percentage of image pixels fall within each zone. In addition to the comparative graph, it can generate a false-color contrast map that projects onto the image the regions where the paper’s reproduction offers limited tonal differentiation. This is a direct aid to decide whether to modify the editing, applied curve, substrate, or printing conditions before making a final proof.
Generation of densitometric scales
The repository also includes densitometric_scale.py, a utility to generate patch scales intended for printing and subsequent measurement. It allows defining the density increment, maximum density, paper size (A4 or A3), physical patch size, and gamma used to convert density to pixel value. The design incorporates separators to facilitate spectrophotometer scanning and adds necessary data in the margin to identify the generated scale.

This approach helps maintain traceability of the process: first, a scale is generated with the established parameters, printed under the desired characterization conditions, measured to obtain the CGATS file, and finally, a specific photograph is analyzed against the obtained response. It is not intended to replace instrumental measurement; on the contrary, the program takes that measurement as a starting point to interpret its consequences on the image.
A workflow for fine art photography and reproduction
- Generate a densitometric scale with the appropriate step and maximum density for the paper and printer to be evaluated.
- Print and measure the scale with a spectrophotometer, obtaining the necessary values in a CGATS file.
- Run the analysis with the measured curve and the photograph to be printed.
- Review the graph, detected tonal limits, and false-color map to assess possible detail losses.
- Adjust the file or change reproduction conditions when the paper curve does not preserve the required tonal range.
The utility can be especially interesting in photographic editing, fine art printing, digitization, and heritage reproduction, where knowing only the maximum density of a paper is insufficient: it is important to understand how the entire curve behaves and what happens with a real image. It also allows more informed comparisons of different papers, printing settings, or process variants.
Requirements and download
Contrast Proof requires Python 3 and the libraries NumPy, OpenCV, Matplotlib, and Pillow. The code, installation instructions, usage examples, and sample files are available in the public GitHub repository.
