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

Method constructor

web/js/main.js:464–467  ·  view source on GitHub ↗
(pixels)

Source from the content-addressed store, hash-verified

462// Re-importing the Median Cut logic from original main.js to ensure it works
463class ColorBox {
464 constructor(pixels) {
465 this.pixels = pixels;
466 this.computeMinMax();
467 }
468 computeMinMax() {
469 let min = [255,255,255,255], max = [0,0,0,0];
470 for (const p of this.pixels) {

Callers

nothing calls this directly

Calls 1

computeMinMaxMethod · 0.95

Tested by

no test coverage detected