Method note · implemented development pipeline

How does MomentGrid turn a photo into a pattern preview?

The current generator validates and prepares the photo in the browser, renders a square crop, then sends only prepared pixel data to a Web Worker that creates three versioned 50 × 50 development patterns.

Last reviewed

What happens to the photo?

  1. Validate the actual file bytes.

    JPEG, PNG and WebP signatures are checked. Empty files, files over 20 MB and unsupported formats fail with a recovery message.

  2. Decode with safe size limits.

    Images over 24 megapixels are rejected, and long edges are reduced to a maximum 4,096-pixel local preview.

  3. Respect JPEG orientation.

    EXIF orientation is read when the browser decoder has not already applied it.

  4. Prepare a square crop.

    The user can reposition, zoom, rotate, adjust brightness and adjust contrast before pattern generation.

  5. Optionally simplify the background.

    A local development method samples the image corners and softens similar background pixels toward the MomentGrid ivory surface.

  6. Generate three patterns off the main UI thread.

    A dedicated Web Worker prepares the variants, matches pixels to the development palette and returns cells plus exact colour counts.

What are Natural, Clean and Contrast?

They are three development transformations of the same prepared crop. Each has an explicit maximum colour count and its own versioned algorithm result.

Natural

Up to 36 colours

Keeps the prepared image’s colour balance before palette matching.

Clean

Up to 24 colours

Smooths neighbouring pixels and reduces small colour changes.

Contrast

Up to 32 colours

Strengthens saturation, contrast and separation before matching.

How are pixels matched to bead colours?

The development algorithm compares each prepared pixel with the RGB values in MARD-221-PUBLIC-V0 using a weighted RGB distance. If too many colours are present, it keeps the most-used candidates for that variant and rematches the cells.

Grid
50 × 50 · 2,500 cells
Algorithm family
momentgrid-dev-rgb-variants-v2
Palette
MARD-221-PUBLIC-V0
Output
Cell indices and exact development counts

Is the preview BOM ready for fulfilment?

No. The worker can count how many preview cells use each development colour, but fulfilment quantities remain unavailable while the palette, inventory, waste allowance, packaging and SKU consumption are not physically verified.

What are the current limitations?

Implemented evidence

  • File-signature and image-size validation
  • EXIF-aware browser-local image preparation
  • Crop, rotation, brightness and contrast controls
  • Versioned worker output and development BOM counts

Still unverified

  • Perceptual matching against measured physical Lab values
  • Cross-device screen-to-product appearance
  • Pattern clarity after real bead assembly
  • Production material and packing quantities