Skip to content

Commit

Permalink
another microoptimization
Browse files Browse the repository at this point in the history
  • Loading branch information
mourner committed Feb 20, 2025
1 parent 4855a68 commit d78aa3b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ function colorDelta(img1, img2, k, m, yOnly) {
let db = b1 - b2;
const da = a1 - a2;

if (!da && !dr && !dg && !db) return 0;
if (!dr && !dg && !db && !da) return 0;

if (a1 < 255 || a2 < 255) { // blend pixels with background
const rb = 48 + 159 * (k % 2);
Expand Down

0 comments on commit d78aa3b

Please sign in to comment.