DDitherMorrow
Product

Product features · Ordered grayscale dithering

01

Keep the threshold tile beside the pixel fixture and review its repeating phase before changing how equality becomes a binary pixel.

01

Connection

Base URL, credentials and a reachable server.

02

Selection

A model available through the configured endpoint.

03

Capabilities

Context limits and tool support are determined by the model and server.

Ordered grayscale dithering

● ● ●DitherMorrow●
A concrete starting point · Ordered grayscale dithering ×
def ordered_dither(pixels):
    pixels = [tuple(row) for row in pixels]
    width = len(pixels[0]) if pixels else 0
    if len(pixels) > 64 or width > 64 or any(len(row) != width for row in pixels):
        raise ValueError("image.shape")
    if any(type(v) is not int or not 0 <= v <= 255 for row in pixels for v in row):
        raise ValueError("pixel.byte")
    thresholds = ((32, 160), (224, 96))
    return [[value >= thresholds[r % 2][c % 2] for c, value in enumerate(row)]
            for r, row in enumerate(pixels)]
✳Apply a repeating two-by-two threshold tile to integer grayscale pixels in matrices up to 64 by 64.
✓ ChangesReview before applying ↗
Illustrative workspace
AI coding workspace

Your next change starts here.

Get the Windows app ↗