Utilities#

The color pipeline holds the color-correction steps (gamma, ICC profile and CMYK affinity blend) that ColorInkjetCompiler, and GCVFCompiler in color mode, apply to color_rgba samples. Pass a ColorPipelineOptions to either compiler to switch steps on or off. ColorPipeline itself lists the bundled ICC profiles.

class pyvcad_compilers.ColorPipeline#

Color correction pipeline that maps sRGBA colors to J750 inks.

Only the ICC profile helpers are exposed to Python. pyvcad_compilers sets the resource path to its bundled icc_profiles folder on import.

static get_icc_profiles() → list[str]#

Returns the ICC profile names found in the resource path, for the icc_profile arguments.

static set_icc_resource_path(path: str) → None#

Sets the base path for ICC profile resources.

Parameters:

path (str) – The path to the ICC profiles directory.

class pyvcad_compilers.ColorPipelineOptions#

Switches for the steps of the color correction pipeline used by ColorInkjetCompiler and GCVFCompiler. Every step is enabled by default.

__init__(self: pyvcad_compilers.pyvcad_compilers.ColorPipelineOptions) → None#

Creates options with every pipeline step enabled.

property affinity_blend_enabled#

Enable the CMYK-primary affinity blend step.

any_enabled(self: pyvcad_compilers.pyvcad_compilers.ColorPipelineOptions) → bool#

Returns True when any pipeline step is enabled.

property first_gamma_enabled#

Enable the first gamma correction step.

property icc_profile_enabled#

Enable the ICC profile correction step.

property second_gamma_enabled#

Enable the second gamma correction step.