DiffImageResult
| Field | Type | What it is |
|---|---|---|
width | numberint | The frame both pictures were compared in. |
height | numberint | |
before | DiffImageArea | Where the first picture sits in that frame. |
after | DiffImageArea | Where the second one sits. |
offset | { x, y }DiffImageOffset | How far the second was moved to line the two up. |
mask | Uint8List | What happened to each pixel of the frame, row by row. |
regions | DiffImageRegion[]List<DiffImageRegion> | Where the changes are, in reading order. |
stats | DiffImageStats | How much of the frame ended up where. |
complete | booleanbool | Whether the list of regions holds all of them. |
A byte of mask is an index into DIFF_PIXEL_KINDSkDiffPixelKinds, which is ['equal', 'changed', 'added', 'removed'][DiffPixelKind.equal, .changed, .added, .removed] — so 0 is a pixel that did not change and anything else is a pixel that did.
offset is where the move went rather than where the contents were: a picture drawn a pixel further to the right than the first is moved a pixel to the left, and x is -1.