meh
This commit is contained in:
parent
f7df0999d7
commit
4fc0a92dbe
1 changed files with 2 additions and 2 deletions
|
@ -20,7 +20,7 @@ class Dither {
|
|||
}
|
||||
|
||||
to4bit(val8) {
|
||||
let val = (val8 / 255) - this.err;
|
||||
let val = (val8 / 255) + this.err;
|
||||
if (val < 0) {
|
||||
val = 0;
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ class Dither {
|
|||
}
|
||||
let val4 = Math.round(val * 15);
|
||||
let dithered = (val4 / 15);
|
||||
this.err = (dithered - val);
|
||||
this.err = (val - dithered);
|
||||
return val4;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue