pub fn diff(
actual: ImgRef<'_, [u8; 4]>,
expected: ImgRef<'_, [u8; 4]>,
) -> DifferenceExpand description
Compares two RGBA images with a neighborhood-sensitive comparison which counts one pixel worth of displacement as not a difference.
See the crate documentation for more details on the algorithm used.
This function does not have any options for ignoring small color differences; rather, the
result can be checked against a Threshold.
Details:
- If the images have different sizes, then the result will always be the maximum difference.
- Differences in the alpha channel are counted the same as differences in luma; the maximum of luma and alpha is used as the result.