Skip to content
Permalink
Browse files

Add missing implementation

Fixes #47
  • Loading branch information...
kornelski committed Apr 15, 2018
1 parent 2621637 commit 2e6b8ac3dbc5c694fc657d73ebf6015ff6e25b8b
Showing with 16 additions and 1 deletion.
  1. +1 −1 Cargo.toml
  2. +8 −0 src/main.rs
  3. +7 −0 src/tolab.rs
@@ -10,7 +10,7 @@ license = "AGPL-3.0"
name = "dssim"
readme = "README.md"
repository = "https://github.com/pornel/dssim.git"
version = "2.9.8"
version = "2.9.9"

[[bin]]
doctest = false
@@ -153,3 +153,11 @@ fn image_gray() {
let (diff, _) = attr.compare(&g1, g3);
assert!(diff < 0.00001);
}

#[test]
fn rgblu_input() {
let ctx = Dssim::new();
let im: ImgVec<RGBLU> = Img::new(vec![rgb::RGB::new(0.,0.,0.)], 1, 1);
let imr: ImgRef<RGBLU> = im.as_ref();
ctx.create_image(&imr);
}
@@ -50,6 +50,13 @@ impl ToLABBitmap for ImgVec<RGBAPLU> {
}
}

impl ToLABBitmap for ImgVec<RGBLU> {
#[inline]
fn to_lab(&self) -> Vec<GBitmap> {
self.as_ref().to_lab()
}
}

impl ToLABBitmap for GBitmap {
fn to_lab(&self) -> Vec<GBitmap> {
let width = self.width();

0 comments on commit 2e6b8ac

Please sign in to comment.
You can’t perform that action at this time.