DiffResult

Properties

Link copied to clipboard

The comparison as a picture — every mismatched (or out-of-bounds) pixel solid red, the rest as rendered — built on first read and not before.

Link copied to clipboard

The largest single-channel difference among the mismatched pixels; 255 for a size change.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Mismatched pixels with a channel past the floor's delta (DEFAULT_FLOOR_CHANNEL_DELTA unless ImageDiffer.diff was told otherwise), out-of-bounds ones included. matches never lets the pixel floor absorb one of these.

Link copied to clipboard

Functions

Link copied to clipboard
fun matches(tolerancePercent: Double = DEFAULT_TOLERANCE_PERCENT, minMismatchedPixels: Int = DEFAULT_MIN_MISMATCHED_PIXELS, pronouncedPixelBudget: Int = DEFAULT_PRONOUNCED_PIXEL_BUDGET): Boolean

True when there are at most minMismatchedPixels mismatched pixels and none is pronounced — the floor is for faint residue, not for a few pixels that changed outright — or when the share of mismatched pixels is within tolerancePercent and at most pronouncedPixelBudget of them are pronounced. The budget is a count, not a share, so the size of an edit the share lets through no longer grows with the canvas.