Use windowed diff density for noise robustness
mainBy default, pixelmatch returns the total count of differing pixels. If you set windowSize: N in the options, the function returns the largest number of diff pixels found in any N×N sliding window.
This is useful for making tests robust to scattered noise (like GPU dithering or sub-pixel anti-aliasing) that doesn't pack densely. You can then fail a test based on density (result / N² > tau) which remains comparable across different image sizes.