Bit Planes Unblocked | __top__

for bit in range(8): plane = (pixels >> bit) & 1 # isolate one bit plane_img = Image.fromarray(plane * 255) # 0→black, 1→white plane_img.save(f'bitplane_bit.png')

In a grayscale image, each pixel is typically stored as an 8‑bit number (0–255). Instead of looking at the full number, a bit plane isolates just across all pixels. bit planes unblocked

(public domain code):

for bit in range(8): plane = (pixels >> bit) & 1 # isolate one bit plane_img = Image.fromarray(plane * 255) # 0→black, 1→white plane_img.save(f'bitplane_bit.png')

In a grayscale image, each pixel is typically stored as an 8‑bit number (0–255). Instead of looking at the full number, a bit plane isolates just across all pixels.

(public domain code):