* Algorithm: Tezumie Style * - Nearest-neighbor center-pixel sampling (preserves sharp edges) * - Builds or receives palette * - Applies FS dithering at block level using LAB color distance * Inspired by Tezumie/Image-to-Pixel: dithering as primary blending tool
(imageData, blockSize, palette)
| 336 | * Inspired by Tezumie/Image-to-Pixel: dithering as primary blending tool |
| 337 | */ |
| 338 | function processWithTezumie(imageData, blockSize, palette) { |
| 339 | const { grid, rows, cols } = extractBlockGridNearest(imageData, blockSize); |
| 340 | const labPalette = buildLabPalette(palette); |
| 341 | floydSteinbergDither(grid, rows, cols, labPalette); |
| 342 | paintBlockGrid(grid, rows, cols, imageData, blockSize); |
| 343 | } |
| 344 | |
| 345 | /** |
| 346 | * Algorithm: Tezumie Style (No Dither) |
no test coverage detected