diff --git a/dither-image.js b/dither-image.js index 1bf07af..422686c 100644 --- a/dither-image.js +++ b/dither-image.js @@ -580,7 +580,11 @@ function decimate(input, palette, n) { // Median cut! // https://en.wikipedia.org/wiki/Median_cut - let buckets = [input.slice()]; + //let buckets = [input.slice()]; + + // preface the reserved bits + let buckets = reserved.slice().map((c) => [atariRGB[c]]).concat([input.slice()]); + let medianCut = (bucket, range) => { if (bucket.length < 2) { console.log(bucket); diff --git a/video/combine.sh b/video/combine.sh index cc81874..e56e0e5 100644 --- a/video/combine.sh +++ b/video/combine.sh @@ -4,6 +4,6 @@ ffmpeg \ -i 'colamath-audio.wav' \ -ac 2 \ -ar 48000 \ - -vf 'pad=w=640:h=480:x=52:y=80' \ + -vf 'pad=w=640:h=360:x=52:y=20' \ -pix_fmt yuv420p \ -y colamath-dither.mp4