Skip to content

mrdiff 0.6.0

Choose a tag to compare

@github-actions github-actions released this 14 Sep 07:23
· 22 commits to main since this release

--offset=dx,dy for images

Two screenshots whose header moved by one row are "49% different" pixel for pixel. --offset places the right image at (dx, dy) on the left one and compares the overlap only, so the question becomes "is the content the same once aligned?":

$ mrdiff --offset=0,-24 before.png after.png
Images differ — 1,440 of 518,400 pixels (0.3%)
First difference at (356, 260)
  right shifted by (0, -24) — the 518,400 overlapping pixels only
  • Images of different sizes are compared too, over the overlap.
  • The output always states the shift and how many pixels that left to compare.
  • --json: image gains offset: {x, y}; total then counts the overlap. Nothing existing changed.
  • --offset on anything but two images is refused.

The core also exposes its PDF page renderer and font glyph renderer (renderPDFPage, FontGlyphs), so a viewer built on it can draw with the same hand that judges.

日本語

画像の --offset=dx,dy。右の絵を左の (dx, dy) に置いて、重なる範囲だけ比べます ── ヘッダーが 1 行動いたスクリーンショット 2 枚が「49% 違う」ではなく「揃えたら中身は同じか」に答えます。寸法が違っても重なる範囲で比べます。出力は必ず、ずらしと重なった画素の数を言います。--json の image に offset が増え、既存の形は変わっていません。


sha256: b030ccaf579b6d864f116e2e95472aeb5a77165cbb3f57d2686312e87e5b62c0