This commit is contained in:
Brooke Vibber 2022-11-20 17:29:10 -08:00
parent f43adce8c5
commit b023e2a73e

View file

@ -434,26 +434,26 @@ function decimate(input, palette, n) {
error.blue[x] += nextError.b / 2; error.blue[x] += nextError.b / 2;
*/ */
error.right.r = nextError.r / 2; error.right.r = nextError.r / 4;
error.right.g = nextError.g / 2; error.right.g = nextError.g / 4;
error.right.b = nextError.b / 2; error.right.b = nextError.b / 4;
if (x == 159) { if (x == 159) {
error.red[0] = error.right.r; error.red[0] = error.right.r;
error.green[0] = error.right.g; error.green[0] = error.right.g;
error.blue[0] = error.right.b; error.blue[0] = error.right.b;
} }
error.red[x - 1] += nextError.r / 8; error.red[x - 1] += nextError.r / 4;
error.green[x - 1] += nextError.g / 8; error.green[x - 1] += nextError.g / 4;
error.blue[x - 1] += nextError.b / 8; error.blue[x - 1] += nextError.b / 4;
error.red[x] += nextError.r / 4; error.red[x] += nextError.r / 4;
error.green[x] += nextError.g / 4; error.green[x] += nextError.g / 4;
error.blue[x] += nextError.b / 4; error.blue[x] += nextError.b / 4;
error.red[x + 1] += nextError.r / 8; error.red[x + 1] += nextError.r / 4;
error.green[x + 1] += nextError.g / 8; error.green[x + 1] += nextError.g / 4;
error.blue[x + 1] += nextError.b / 8; error.blue[x + 1] += nextError.b / 4;
/* /*
error.right.r = nextError.r / 4; error.right.r = nextError.r / 4;