#color #profile #sys #icc #lcms

sys lcms2-sys

Bindings for liblcms2 (Little CMS) with support for Linux, macOS, and Windows. See lcms2 crate for a safe Rust wrapper

27 releases (stable)

✓ Uses Rust 2018 edition

new 3.1.2 Oct 22, 2019
3.1.1 Jul 10, 2019
3.1.0 Mar 25, 2019
2.4.8 Jan 5, 2018
0.5.0 Jul 16, 2016

#25 in Images

Download history 491/week @ 2019-07-09 382/week @ 2019-07-16 356/week @ 2019-07-23 119/week @ 2019-07-30 217/week @ 2019-08-06 142/week @ 2019-08-13 358/week @ 2019-08-20 101/week @ 2019-08-27 174/week @ 2019-09-03 143/week @ 2019-09-10 206/week @ 2019-09-17 129/week @ 2019-09-24 116/week @ 2019-10-01 52/week @ 2019-10-08 198/week @ 2019-10-15

714 downloads per month
Used in 2 crates (1 directly)

MIT license

1MB
24K SLoC

C 22K SLoC // 0.1% comments Rust 1.5K SLoC // 0.2% comments

Little CMS bindings for Rust

Makes LCMS C API available in Rust. There's also a higher-level wrapper.

It's up to date with version 2.9. Linux, macOS and Windows are supported. Other platforms may work, too.

Differences from the C API

  • Type names don't have the cms prefix, e.g. cmsColorSpace is ColorSpace.
    • All C function names remained the same (with the prefix, e.g. fn cmsReadTag()).
  • Enum values don't have the cmsSig prefix, e.g. cmsSigLabData is LabData.
  • Some arguments use more specific type, e.g. Intent::Perceptual enum instead of INTENT_PERCEPTUAL integer.

Dynamic vs static

If LCMS2_LIB_DIR environmental variable is set and contains either static or dynamic library, this libary will be used regardless of other settings.

The package supports "static" and "dynamic" Cargo features. If "dynamic" is selected (the default) then it will link to system-wide LCMS2 shared library if pkg-config is installed and working correctly.

If pkg-config doesn't work (i.e. on Windows), or the "static" feature is enabled, it will build LCMS 2.9 from source instead.

If LCMS2_STATIC environmental variable is set it will prefer static linking.

Contributing

Make sure you clone with --recursive or run

git submodule update --init

before compiling.

Dependencies