1 unstable release

0.1.0 Jan 14, 2021

#1019 in Images

Download history 57/week @ 2024-12-04 40/week @ 2024-12-11 17/week @ 2024-12-18 4/week @ 2024-12-25 56/week @ 2025-01-01 57/week @ 2025-01-08 47/week @ 2025-01-29 5/week @ 2025-02-05 19/week @ 2025-02-12 155/week @ 2025-02-19 113/week @ 2025-02-26 10/week @ 2025-03-05 6/week @ 2025-03-12 7/week @ 2025-03-19

151 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