website/docs/visual-testing/compare-options.md
Compare options are options that influence the way the comparison, by ResembleJS is being executed.
:::info NOTE
All compare options can be used during service instantiation or for each single checkElement,checkScreen and checkFullPageScreen. If a method option has the same key as an option that has been set during the instantiation of the service, then the method compare option will override the service compare option value.
:::
ignoreAlphabooleanfalsecheckElement, checkScreen() and checkFullPageScreen(). It will override the plugin settingCompare images and discard alpha.
blockOutSideBarbooleanfalsecheckScreen(). It will override the plugin setting. This is iPad onlyAutomatically block out the sidebar for iPads in landscape mode during comparisons. This prevents failures on the tab/private/bookmark native component.
blockOutStatusBarbooleanfalsecheckElement, checkScreen() and checkFullPageScreen(). It will override the plugin setting. This is Mobile onlyAutomatically block out the status and address bar during comparisons. This prevents failures on time, wifi or battery status.
blockOutToolBarbooleanfalsecheckElement, checkScreen() and checkFullPageScreen(). It will override the plugin setting. This is Mobile onlyAutomatically block out the toolbar.
ignoreAntialiasingbooleanfalsecheckElement, checkScreen() and checkFullPageScreen(). It will override the plugin settingCompare images and discard anti-aliasing.
ignoreColorsbooleanfalsecheckElement, checkScreen() and checkFullPageScreen(). It will override the plugin settingEven though the images are in color, the comparison will compare 2 black/white images
ignoreLessbooleanfalsecheckElement, checkScreen() and checkFullPageScreen(). It will override the plugin settingCompare images and compare with red = 16, green = 16, blue = 16, alpha = 16, minBrightness=16, maxBrightness=240
ignoreNothingbooleanfalsecheckElement, checkScreen() and checkFullPageScreen(). It will override the plugin settingCompare images and compare with red = 0, green = 0, blue = 0, alpha = 0, minBrightness=0, maxBrightness=255
ignoreTransparentPixelbooleanfalsecheckElement, checkScreen() and checkFullPageScreen(). It will override the plugin settingCompare images and it will ignore all pixels that have some transparency in one of the images
rawMisMatchPercentagebooleanfalsecheckElement, checkScreen() and checkFullPageScreen(). It will override the plugin settingIf true the return percentage will be like 0.12345678, default is 0.12
returnAllCompareDatabooleanfalsecheckElement, checkScreen() and checkFullPageScreen(). It will override the plugin settingThis will return all compare data, not only the mismatch percentage
saveAboveTolerancenumber0checkElement, checkScreen() and checkFullPageScreen(). It will override the plugin settingAllowable value of misMatchPercentage that prevents saving images with differences
largeImageThresholdnumber0checkElement, checkScreen() and checkFullPageScreen(). It will override the plugin settingComparing large images can lead to performance issues.
When providing a number for the number of pixels here (higher than 0), the comparison algorithm skips pixels when the image width or height is larger than largeImageThreshold pixels.
scaleImagesToSameSizebooleanfalsecheckElement, checkScreen() and checkFullPageScreen(). It will override the plugin settingScales 2 images to the same size before execution of comparison. Highly recommended to enable ignoreAntialiasing and ignoreAlpha