Function re_viewer::external::egui_kittest::image_snapshot_options
pub fn image_snapshot_options(
current: &ImageBuffer<Rgba<u8>, Vec<u8>>,
name: &str,
options: &SnapshotOptions,
)
Expand description
Image snapshot test with custom options.
If you want to change the default options for your whole project, it’s recommended to create a
new my_image_snapshot
function in your project that calls this function with the desired options.
You could additionally use the
disallowed_methods
lint to disable use of the image_snapshot
to prevent accidentally using the wrong defaults.
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
.
§Panics
Panics if the image does not match the snapshot or if there was an error reading or writing the snapshot.