Skip to main content

Crate rust_motion_cms

Crate rust_motion_cms 

Source
Expand description

Photocraft colour management: a pure-Rust ICC v2/v4 colour management module.

  • Profile parses ICC profiles (matrix/TRC RGB, gray TRC, mft1/mft2/mAB /mBA LUT profiles incl. CMYK↔Lab, curv/para curves) and writes ICC v4 profiles.
  • Transform connects two profiles through the PCS (XYZ/Lab D50) with a rendering Intent and optional black point compensation, and converts 8/16-bit and float pixel buffers through precomputed tables (tetrahedral 3D/4D interpolation, rayon on native).
  • builtin ships sRGB, Display P3, Adobe RGB (1998)-compatible, ProPhoto-compatible, linear sRGB, Rec. 2020, Gray 2.2, sGray, Lab D50 and a synthetic coated CMYK profile.
  • Lut3d samples a display transform into a 3D texture for the GPU canvas.

Implemented from the public ICC.1:2010 (v4.3) and ICC.1:2001-04 (v2) specifications, CIE 15, and Adobe’s published black point compensation paper. This crate depends on no other workspace crate.

Re-exports§

pub use builtin::Builtin;
pub use clut::Clut;
pub use curve::Curve;
pub use gamut::GamutCheck;
pub use lut3d::Lut3d;
pub use profile::ColorSpace;
pub use profile::Pcs;
pub use profile::Profile;
pub use profile::ProfileClass;
pub use transform::black_point;
pub use transform::cached;
pub use transform::SampleKind;
pub use transform::Transform;
pub use transform::TransformOptions;

Modules§

builtin
Built-in profiles. All are generated by this crate from published colorimetric definitions (primaries, white points, transfer functions) and dedicated to the public domain (CC0-1.0), so documents that embed them carry no licence obligations. See the crate README.
clut
Multi-dimensional colour lookup tables (ICC CLUTs) with tetrahedral interpolation.
curve
One-dimensional tone curves (ICC curv and para tag types) and their inverses.
gamut
Gamut checks against a proof (output) profile: Photoshop’s View › Gamut Warning.
lut3d
3D lookup tables for applying a display transform on the GPU.
lutfile
Creative 3D LUT files for Image › Adjustments › Color Lookup: .cube (Adobe/Resolve), .3dl (Autodesk Lustre / Flame) and .look (SpeedGrade XML), plus a few generated (CC0) looks.
math
Small colour-science helpers: 3×3 matrices, CIE XYZ ↔ Lab*, chromatic adaptation.
pipeline
Float evaluation pipelines: a list of stages mapping normalised device values to the profile connection space (or back). This is the exact reference path; crate::Transform builds faster lookup tables from it.
profile
ICC profiles: the parsed model, the reader (ICC.1:2001-04 v2 and ICC.1:2010 v4) and the connection of a profile to the PCS as evaluation stages.
synth
Synthetic CMYK output profiles.
transform
Colour transforms between profiles through the PCS, with rendering intents, black point compensation, soft-proofing chains, and fast lookup-table evaluation of pixel buffers.

Enums§

CmsError
Errors from parsing profiles or building transforms.
Intent
ICC rendering intent.