Skip to main content

save_diff_image

Function save_diff_image 

Source
pub fn save_diff_image(before: &[u8], after: &[u8], output: &Path) -> Result<()>
Expand description

Save a diff image highlighting changed pixels.

Changed pixels are overlaid with semi-transparent red.

§Arguments

  • before - PNG bytes of the before image
  • after - PNG bytes of the after image
  • output - Path to save the diff image

§Errors

Returns an error if the images cannot be loaded or the output cannot be written.