Package Exports
- lcms-wasm
- lcms-wasm/dist/lcms.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (lcms-wasm) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
lcms-wasm
This is a reboot of yoya/lcms.js (now several years old), using WASM instead of ASM.js for improved performance and memory growth. This allows for Little-CMS in JavaScript, with the specific goal of parsing, loading, and transforming between color spaces defined by ICC color profiles.
Build from source
Clone the repo, then:
cd lcms-wasm
git submodule update --init --recursive
npm install
# if not already runnable
chmod +x ./build.sh
npm run build
# run the demos
node test/lab.js
node test/cmyk.js
Docs
The API is quite low-level and relatively closely matches the Little-CMS library. This project also mainly exposes the bare color profile transformation features, rather than the entire color management system. Until some docs are written, see the Demos for example usage.
Demos
The test/
folder includes two demos:
- CMYK to sRGB transform (you will need to bring your own ICC files for licensing reasons)
- sRGB to CIE Lab* transform
You can also see yoya's original demo of the lcms.js library here: