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

Function processWithTezumie

web/js/algorithms.js:338–343  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

336 * Inspired by Tezumie/Image-to-Pixel: dithering as primary blending tool
337 */
338function 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)

Callers 1

processImageFunction · 0.85

Calls 4

extractBlockGridNearestFunction · 0.85
buildLabPaletteFunction · 0.85
floydSteinbergDitherFunction · 0.85
paintBlockGridFunction · 0.85

Tested by

no test coverage detected