using DitherPunk
using Images
using TestImages

Image Gallery

This gallery uses images from TestImages.jl.

function preprocess(img)
    img = Gray.(img)
    return imresize(img; ratio=1 / 2)
end

file_names = [
    "cameraman", "lake_gray", "house", "fabio_gray_512", "mandril_gray", "peppers_gray"
]
img = mosaic([preprocess(testimage(file)) for file in file_names]; ncol=3)

Threshold dithering

ConstantThreshold

dither(img, ConstantThreshold())

WhiteNoiseThreshold

dither(img, WhiteNoiseThreshold())

Ordered dithering

Bayer matrices

Level 1

dither(img, Bayer())

Level 2

dither(img, Bayer(2))

Level 3

dither(img, Bayer(3))

Level 4

dither(img, Bayer(4))

ClusteredDots

dither(img, ClusteredDots())

CentralWhitePoint

dither(img, CentralWhitePoint())