aheckmann / gm

GraphicsMagick for node
http://aheckmann.github.com/gm/
6.95k stars 615 forks source link

Compare: add `metric` param to gm.CompareOptions #833

Open htho opened 3 years ago

htho commented 3 years ago

I'd like to have more control over the way images are compared. The metric parameter could easily be added to gm.CompareOptions.

http://www.graphicsmagick.org/compare.html

    interface CompareOptions {
        file?: string;
        highlightColor?: string;
        highlightStyle?: HighlightStyle;
        tolerance?: number;

        metric?: "mae" | "mse" | "pae" | "psnr" | "rmse";
    }