Rust ICC management
Fast and safe converting between ICC profiles in pure Rust.
Supports CMYK <-> RGBX and RGBX <-> RGBX, RGBX <-> GRAY, LAB <-> RGBX, CMYK <-> LAB
Example
let f_str = "./assets/dci_p3_profile.jpeg";
let file = open.expect;
let img = open.unwrap.decode.unwrap;
let rgb = img.to_rgb8;
let mut decoder = new.unwrap;
let icc = decoder.icc_profile.unwrap.unwrap;
let color_profile = new_from_slice.unwrap;
let dest_profile = new_srgb;
let transform = color_profile
.create_transform_8bit
.unwrap;
let mut dst = vec!;
for in rgb
.chunks_exact
.zip
save_buffer
.unwrap;
Benchmarks
ICC transform 8-bit
Test made on the image 1997x1331 size
Conversion | time(NEON) | Time(AVX2) |
---|---|---|
moxcms RGB->RGB | 2.83ms | 4.57ms |
moxcms LUT RGB->RGB | 17.93ms | 29.72ms |
moxcms RGBA->RGBA | 3.08ms | 4.87ms |
moxcms CMYK->RGBA | 23.53ms | 43.28ms |
lcms2 RGB->RGB | 13.1ms | 27.73ms |
lcms2 RGBA->RGBA | 21.97ms | 35.70ms |
lcms2 CMYK->RGBA | 39.71ms | 79.40ms |
qcms RGB->RGB | 6.47ms | 4.59ms |
qcms LUT RGB->RGB | 26.72ms | 60.80ms |
qcms RGBA->RGBA | 6.83ms | 4.99ms |
qcms CMYK->RGBA | 25.97ms | 61.54ms |
This project is licensed under either of
at your option.