#image #test-cases #comparison #renderer #diffing #diff #algorithm


Image comparison (diffing) for computer graphics renderer test cases

4 releases

0.2.1 Jun 10, 2024
0.2.0 Jun 9, 2024
0.1.1 Jun 8, 2024
0.1.0 May 6, 2023

#225 in Images

Download history 128/week @ 2024-02-26 28/week @ 2024-03-04 48/week @ 2024-03-11 90/week @ 2024-03-18 20/week @ 2024-03-25 51/week @ 2024-04-01 2/week @ 2024-04-08 6/week @ 2024-04-15 20/week @ 2024-04-22 33/week @ 2024-04-29 13/week @ 2024-05-06 6/week @ 2024-05-13 47/week @ 2024-05-20 18/week @ 2024-05-27 250/week @ 2024-06-03 372/week @ 2024-06-10

688 downloads per month


479 lines


Image comparison (diffing) for computer graphics renderer test cases

The algorithm implemented in this Rust library is intended to allow comparing images of the same scene which were rendered using different algorithms, or different hardware, causing small “rounding errors” in either color or spatial position that should be ignored as insignificant.

See the library documentation for details on the algorithm used.

rendiff provides only a comparison algorithm which can use a pass/fail criterion, and a visual representation of the diff; it does not provide any test-framework features like loading expected images and overwriting them, or producing visual reports.


rendiff is being used within one of my other projects (all-is-cubes) and reliably performs its function. However, there are several features that it lacks, which may result in breaking API or behavior changes in future versions:

  • Customizing the pixel comparison (color value distance) function.
  • Allowance for antialiased edges.
  • Input images of greater than 8 bits-per-component.


Licensed under either of

at your option.


Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.


~41K SLoC