Function twenty_twenty::assert_image
source ยท pub fn assert_image<P: AsRef<Path>>(
path: P,
actual: &DynamicImage,
min_permissible_similarity: f64
)
Expand description
Compare the contents of the file to the image provided.
If the two are less similar than the min_permissible_similarity
threshold,
the test will fail.
The min_permissible_similarity
is a float between 0 and 1.
The score is a float between 0 and 1.
If the images are the exact same, the score will be 1.