MCPcopy Create free account
hub / github.com/32comic/image2pixel-web / processWithLabDither

Function processWithLabDither

web/js/algorithms.js:324–329  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

322 * - Applies FS dithering at block level using LAB color distance
323 */
324function 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

Callers 1

processImageFunction · 0.85

Calls 4

extractBlockGridAverageFunction · 0.85
buildLabPaletteFunction · 0.85
floydSteinbergDitherFunction · 0.85
paintBlockGridFunction · 0.85

Tested by

no test coverage detected