Skip to content

Commit

Permalink
Merge pull request #96 from gemini-testing/fix/create_diff_image/off_…
Browse files Browse the repository at this point in the history
…by_one

fix: createDiffImage off by one
  • Loading branch information
KuznetsovRoman authored Sep 27, 2023
2 parents 9792088 + cd9744b commit 16b6f4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ exports.calcDiffImage = async (img1, img2, comparator, {highlightColor, shouldCl

for (let y = 0; y < maxHeight; y++) {
for (let x = 0; x < maxWidth; x++) {
if (y > minHeight || x > minWidth) {
if (y >= minHeight || x >= minWidth) {
markDiff(x, y); // Out of bounds pixels considered as diff
continue;
}
Expand Down

0 comments on commit 16b6f4f

Please sign in to comment.