1 unstable release

0.1.0 Jan 14, 2021

#1037 in Images

Download history 23/week @ 2024-12-16 6/week @ 2024-12-23 44/week @ 2024-12-30 61/week @ 2025-01-06 8/week @ 2025-01-13 36/week @ 2025-01-27 15/week @ 2025-02-03 10/week @ 2025-02-10 124/week @ 2025-02-17 138/week @ 2025-02-24 24/week @ 2025-03-03 6/week @ 2025-03-10 5/week @ 2025-03-17 17/week @ 2025-03-24 47/week @ 2025-03-31

76 downloads per month
Used in 2 crates

MIT license

1.5MB
340 lines

pixelmatch-rs

Pixel-level image comparison

Completely based on pixelmatch.

let num_diff_pixels = pixelmatch(
    im1,
    img2,
    diff,
    None,
    None,
    Some(Options {
        threshold: 0.1,
        ..Default::default()
    }),
);

Implements ideas from the following papers:

Example output

expected actual diff
1diff
1diff
1diff

Command line

Pixelmatch comes with a binary that works with PNG images:

pixelmatch --threshold 0.1 image1.png image2.png output.png

Dependencies

~5.5MB
~72K SLoC