Skip to content

Report the required threshold #33

@emilk

Description

@emilk

I would like it if dify::diff::get_results could return what threshold I would need to set in order to get the test to pass.
It should probably return some struct with that, the number of failed pixels, and the diff-image, e.g.:

pub struct DiffOutput {
    pub num_failed_pixels: usize,

    /// The largest pixel-error.
    /// If you set the threshold to this (or higher),
    /// the test will always pass.
    pub max_error: f32,

    pub diff_image: RgbaImage,
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions