```rust extern crate lab; use lab::Lab;
let pinkinlab = Lab::from_rgb(&[253, 120, 138]); // Lab { l: 66.639084, a: 52.251457, b: 14.860654 } ```
```rust extern crate lab; extern crate image;
use lab::Lab; use image::Rgba;
let pixel: Rgba
The lab::simd
module is compiled for the x86_64
cpu architecture. If the
current cpu can run AVX and SSE 4.1 operations, it can make use of the exported
functions.
```rust extern crate lab; use lab::Lab;
use lab::simd;
fn convertrgbs(rgbs: &[[u8; 3]]) -> Vec
Performance increase over a serial map is wildly variable across CPUs, suggesting that there are still some optimizations to perform. A 2013 Macbook Air sees a \~25% decrease in benchmark times converting Labs to RGBs, and a \~40% decrease converting RGBs to Labs. Meanwhile a 6-core desktop computer sees near perfect 8x speedup converting Labs to RGBs, but a <10% improvement converting RGBs to Labs. Clearly it is a work in progress.
Lab 0.7.0 requires Rust >= 1.31.0 for the chunks_exact slice method
Lab 0.6.0 can build as far back as Rust 1.13.0. Testing releases gets pretty tedious earlier than that.