Expand description
§ocio
A pure Rust port of OpenColorIO, the color management framework for visual effects and animation.
use ocio::Config;
let config = Config::create_from_file("config.ocio").unwrap();
let processor = config.get_processor("ACEScg", "sRGB - Display").unwrap();
let cpu = processor.default_cpu_processor();
let mut pixel = [0.18f32, 0.18, 0.18];
cpu.apply_rgb(&mut pixel);Re-exports§
pub use baker::Baker;pub use config::Config;pub use context::Context;pub use dynamic_property::DynamicProperty;pub use error::Error;pub use error::Result;pub use format_metadata::FormatMetadata;pub use image_desc::ImageData;pub use image_desc::ImageDesc;pub use image_desc::PackedImageDesc;pub use image_desc::PlanarImageDesc;pub use processor::CpuProcessor;pub use processor::Processor;pub use processor::ProcessorMetadata;pub use transforms::grading::*;pub use transforms::*;pub use types::*;
Modules§
- apphelpers
- Application helpers (port of
OpenColorAppHelpers.handsrc/OpenColorIO/apphelpers): color space menus, (display, view) helpers, the legacy viewing pipeline, color mixing helpers and config merging. - baker
- LUT baking (port of
Baker.cppandBakingUtils.cpp). - builtins
- Builtin transforms (ACES, camera log curves, display curves) and builtin
configs (port of
transforms/builtins/*,transforms/BuiltinTransform.cppandbuiltinconfigs/*). - config
- The configuration: color spaces, roles, displays / views, looks, view
transforms, named transforms, file and viewing rules (port of
Config.cppand of the config objects ofOpenColorIO.h). - context
- Context: search paths, working directory and context (environment)
variables used to resolve file references (port of
Context.cppandContextVariableUtils.cpp). - dynamic_
property - Dynamic properties: values of a processor that can be changed after the processor is created (exposure, contrast, gamma, grading values).
- error
- Error types.
- fileformats
- LUT / transform file formats (port of
FileTransform.hregistry and thefileformats/directory). - format_
metadata - Rich metadata attached to transforms (port of
FormatMetadata). - gpu
- GPU shader generation (port of
GpuShaderDesc.cpp,GpuShader.cpp,GPUProcessor.cpp,GpuShaderUtils.cpp,GpuShaderClassWrapper.cppand the*OpGPU.cpprenderers). - hash_
utils - Cache identifier hashes (port of
HashUtils.cpp): XXH3 128-bit hashes formatted as OCIO does. - image_
desc - Image descriptions used by
CpuProcessor::apply(port ofImageDesc). - math_
utils - Math helpers (port of the parts of
MathUtils.cppshared across modules). - ops
- Ops: the internal, CPU-evaluable building blocks a processor is made of
(port of
Op.h/OpData/ the*OpCPUrenderers). - path_
utils - Path helpers mirroring the
pystring::os::pathfunctions used by OCIO. - processor
- Processors: an optimized list of ops ready to be applied to pixels (port
of
Processor.cpp,CPUProcessor.cppandOpOptimizers.cpp). - transforms
- Transforms: the user-facing descriptions of color operations (port of
OpenColorTransforms.h). - types
- Core enumerations, string conversions and constants (port of
OpenColorTypes.hand the string helpers ofParseUtils.cpp).
Macros§
- bail
- Early-return with an
Error::Exceptionbuilt from a format string. - nl
- Build one shader line from its parts and add it to a
GpuShaderText(port of OCIO’sGpuShaderText::newLine() << ...).
Constants§
- OCIO_
VERSION - Library version: the latest OCIO release fully covered by this port
(see
UPSTREAM.md). - VERSION
- Version of this crate.
Functions§
- clear_
all_ caches - Clear all the caches of the library (port of
ClearAllCaches): the file transform cache (files are read again on the next use).