M 091 / 18304 Print & Ditheralgorithm output

Nearest-Neighbor Pixelation

Pixelation / Nearest Neighbor. dither, printing & texture

Typeface · Jersey 10

Real-world algorithm demonstration, applied to a NASA portrait.
Real-world algorithm demonstration, applied to a NASA portrait.Image: NASA / Eileen Collins · scikit-image (public domain)View source ↗

Prompt

Apply Nearest-Neighbor Pixelation, reducing the image to a low-resolution grid and enlarging it into prominent, uniformly sized square pixels. Give each block one flat sampled color, with hard staircase edges, simplified textures, and no interpolation, blur, outlines, or added grain. Keep the original subject and composition.

Identify

Large square pixels replace details.

Principle

Scaling down1 and nearest-neighbor magnification2 create pixel blocks.

Try it out

Test 16, 32, 64 pixel image widths.

Classification

Calculated image processing result.

Further examples · 7 images

Nearest neighbor zoom of a GIF in GNOME Image viewer
02 Nearest neighbor zoom of a GIF in GNOME Image viewerA blue wireframe structure is displayed within an image viewer interface. The image shows blocks of color and jagged edges, demonstrating how nearest-neighbor magnification preserves the original pixel grid at high zoom levels.Anselm Schüler · CC BY-SA 4.0 · Wikimedia Commons
Nearest-Neighbor Scaling Artifacts
03 Nearest-Neighbor Scaling ArtifactsTwo sets of geometric patterns illustrate original and scaled versions. It is a good example because the non-integer scaling creates uneven block sizes and distortions typical of the nearest-neighbor algorithm.ZERICO2005 · CC0 · Wikimedia Commons
Car photo taken by gameboy camera (nearest-neighbor upscaled)
04 Car photo taken by gameboy camera (nearest-neighbor upscaled)A monochrome photograph shows a car rendered in a low-resolution dithered style. The upscaling reveals sharp, square blocks of black, white, and gray, maintaining the aesthetic of the original small-format digital capture.Weakmassive · CC BY-SA 3.0 · Wikimedia Commons
Resize nearest neighbor
05 Resize nearest neighborThis image presents a close-up detail of a map or celestial chart. The visible stair-stepping on curved lines and text illustrates how nearest-neighbor resizing avoids blurring by duplicating existing pixels.Grap-wh · Public domain · Wikimedia Commons
Pixelate filter example - Pixlr Photo Editor
06 Pixelate filter example - Pixlr Photo EditorA landscape is processed with a digital filter, creating a blocky texture throughout the foliage. The sharp, un-interpolated edges of the color blocks define the nearest-neighbor effect.Stockywood · CC BY-SA 4.0 · Wikimedia Commons
Upscaled pixel art of a city at night
07 Upscaled pixel art of a city at nightA night city scene is rendered with large, distinct squares of color. This illustrates the aesthetic result of upscaling pixel art where each original data point becomes a large, visible block.Stvk Công Cuối (VN) · CC0 · Wikimedia Commons