cutcutcodec.core.colorspace.heuristic

Estimate missing information.

Functions

guess_space(height, width[, suffix])

Guess a gamut and gamma based on the image shape.

Details

cutcutcodec.core.colorspace.heuristic.guess_space(height: Integral, width: Integral, suffix: str = '') tuple[str, str][source]

Guess a gamut and gamma based on the image shape.

It comes from https://wiki.x266.mov/docs/colorimetry/primaries#2-unspecified.

Parameters

height, widthint

The image shape

suffixstr

The extension name of the file, ex « .mp4 ».

Returns

primariesstr

A guessed primary color space gamut.

transferstr

A guessed primary transfer function gamma.