Choose a `diffingEngine` for image comparison
masterLoki supports three diffing engines. You can select an engine by setting its name in the configuration and passing an optional JSON block of settings specific to that library.
Available Engines
pixelmatch(Default)- Type: JavaScript only.
- Characteristics: Fast, less susceptible to anti-alias flakiness, but more sensitive to changes on large images.
- Dependencies: None.
gm(GraphicsMagick)- Type: Uses the GraphicsMagick library.
- Characteristics: Generally faster than
pixelmatch. Configuration is passed to theoptionsargument ingm.compare. - Dependencies: Requires GraphicsMagick installed (e.g.,
brew install graphicsmagick).
looks-same- Type: JavaScript only.
- Characteristics: Slower and produces a different diff image. It uses a
chromeTolerancepercentage based on neighboring pixels, making it ideal for handling different pixel densities. - Dependencies: None.
Example configuration for looks-same:
{
"loki": {
"looks-same": {
"ignoreCaret": true
}
}
}