* Algorithm: LAB + Floyd-Steinberg Dithering * - Averages blocks (same as classic) * - Builds or receives palette * - Applies FS dithering at block level using LAB color distance
(imageData, blockSize, palette)
| 322 | * - Applies FS dithering at block level using LAB color distance |
| 323 | */ |
| 324 | function processWithLabDither(imageData, blockSize, palette) { |
| 325 | const { grid, rows, cols } = extractBlockGridAverage(imageData, blockSize); |
| 326 | const labPalette = buildLabPalette(palette); |
| 327 | floydSteinbergDither(grid, rows, cols, labPalette); |
| 328 | paintBlockGrid(grid, rows, cols, imageData, blockSize); |
| 329 | } |
| 330 | |
| 331 | /** |
| 332 | * Algorithm: Tezumie Style |
no test coverage detected