From 34aa4f55b653e111563c1f697365503b1c6ea141 Mon Sep 17 00:00:00 2001 From: Brooke Vibber Date: Sat, 7 Sep 2024 15:19:15 -0700 Subject: [PATCH] ???????????? --- dither-image.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dither-image.js b/dither-image.js index 8fd2179..2e6444e 100644 --- a/dither-image.js +++ b/dither-image.js @@ -79,8 +79,7 @@ class RGB { let lm = val & 15; let crlv = cr ? 50 : 0; - /* - let phase = ((cr - 1) * 25 - 58) * (2 * Math.PI / 360); + let phase = ((cr - 1) * 25 - 33) * (2 * Math.PI / 360); let y = 255 * (lm + 1) / 16; let i = crlv * Math.cos(phase); @@ -89,8 +88,8 @@ class RGB { let r = y + 0.956 * i + 0.621 * q; let g = y - 0.272 * i - 0.647 * q; let b = y - 1.107 * i + 1.704 * q; - */ + /* // PAL let phase = ((cr - 1) * 25.7 - 15) * (2 * Math.PI / 360); @@ -101,6 +100,7 @@ class RGB { let r = y + 0.956 * i + 0.621 * q; let g = y - 0.272 * i - 0.647 * q; let b = y - 1.107 * i + 1.704 * q; + */ return new RGB(r, g, b).clamp().fromSRGB(); }