Function re_viewer::external::egui_kittest::try_image_snapshot
pub fn try_image_snapshot(
current: &ImageBuffer<Rgba<u8>, Vec<u8>>,
name: &str,
) -> Result<(), SnapshotError>
Expand description
Image snapshot test.
This uses the default SnapshotOptions
. Use try_image_snapshot_options
if you want to
e.g. change the threshold or output path.
The snapshot files will be saved under SnapshotOptions::output_path
.
The snapshot will be saved under {output_path}/{name}.png
.
The new image from the most recent test run will be saved under {output_path}/{name}.new.png
.
If the new image didn’t match the snapshot, a diff image will be saved under {output_path}/{name}.diff.png
.
§Errors
Returns a SnapshotError
if the image does not match the snapshot or if there was an error
reading or writing the snapshot.