#!/usr/bin/env python3 """ pixdither - Image dithering tool with Floyd-Steinberg algorithm Converts images to reduced color palettes using error diffusion """
python pixdither.py photo.jpg --no-dither -o quantized.png
error = old_pixel - new_pixel
# Load image self.img = Image.open(image_path).convert('RGB') self.pixels = np.array(self.img, dtype=np.float32) self.height, self.width = self.pixels.shape[:2] pixdither
Unlike simple "mosaic" effects that just create large blocks, PixDither applies, as of its current versions, over 20 distinct color palettes and dithering methods. It simulates the "lo-fi" aesthetic by utilizing mathematical algorithms to arrange available colors, creating the illusion of smooth gradients, or, more accurately, the stunningly gritty patterns of the 1980s and early 1990s. Core Features and Dithering Methods
is a specialized color quantization and dithering plugin for Adobe After Effects, developed by Wunkolo . It is designed to stylize modern footage into retro raster graphics by replicating the restricted color palettes and visual textures of classic hardware. Core Features
: PixDither is a top-tier choice for motion designers seeking a high-fidelity "retro" look. It bridges the gap between high-definition video and the nostalgic limitations of 8-bit hardware with professional-grade precision. Wunkolo updated PixDither - itch.io It is designed to stylize modern footage into
# Convert to black and white with Floyd-Steinberg python pixdither.py photo.jpg
Variations of error diffusion that offer different degrees of noise and pattern density. Ordered Dithering (Bayer Patterns):
images = [] base_img = Image.open(input_path).convert('RGB') Wunkolo updated PixDither - itch
This is where the genius of "dithering" enters the equation. Dithering is a form of controlled noise. By arranging pixels in a specific checkerboard or scattered pattern, a computer can trick the human eye into perceiving intermediate shades that do not actually exist. If a black pixel and a white pixel are placed next to each other and viewed from a distance, the human eye blends them into gray. By varying the density of these patterns—tightly packed for dark shades, sparse for light ones—an image can retain its depth and form despite a crippling lack of color data.
Furthermore, the philosophy of pixdither extends beyond mere aesthetics into the realm of data compression and efficiency. It teaches a valuable lesson about perception: that reality is often a construction of the mind. The image is not actually smooth; it is a chaotic array of dots. But the brain, seeking order, creates the gradient. This interplay between the raw data (the noise) and the perceived image (the order) is the core magic of the technique.
def atkinson(self): """Apply Atkinson dithering""" result = self.pixels.copy()
# Process single image try: dithered = PixDither( args.input, args.output, bits_per_channel=args.bits, palette_type=args.palette, dither_algorithm=args.algorithm ) dithered.process()