All Projects → JuliaImages → DitherPunk.jl

JuliaImages / DitherPunk.jl

Licence: MIT license
Dithering algorithms in Julia.

Programming Languages

julia
2034 projects

Projects that are alternatives of or similar to DitherPunk.jl

WernessDithering
Copy of dithering code by Brent Werness (Koloth) invented for Obra Dinn
Stars: ✭ 24 (-14.29%)
Mutual labels:  dithering
undither
Smart filter to remove Floyd-Steinberg dithering from paletted images
Stars: ✭ 38 (+35.71%)
Mutual labels:  dithering
canvas-dither
🖼 Simple demo of image processing in Javascript using HTML5 and Canvas
Stars: ✭ 40 (+42.86%)
Mutual labels:  dithering
MultiTileBlueNoise
Storage for blue noise textures, including mixed-tiling textures, in results/
Stars: ✭ 16 (-42.86%)
Mutual labels:  dithering
nQuantCpp
nQuantCpp includes top 6 color quantization algorithms for visual c++ producing high quality optimized images.
Stars: ✭ 83 (+196.43%)
Mutual labels:  dithering
Image-to-Braille
Give it an image, and it will become unicode braille
Stars: ✭ 140 (+400%)
Mutual labels:  dithering
colorquant
Go library for color quantization and dithering
Stars: ✭ 75 (+167.86%)
Mutual labels:  dithering
hicolor
🎨 Convert images to 15/16-bit RGB color with dithering
Stars: ✭ 172 (+514.29%)
Mutual labels:  dithering
KGySoft.Drawing
KGy SOFT Drawing is a library for advanced image, icon and graphics handling.
Stars: ✭ 27 (-3.57%)
Mutual labels:  dithering

💀 DitherPunk.jl 💀

Documentation Build Status

A dithering / digital halftoning package inspired by Lucas Pope's Obra Dinn and Surma's blogpost of the same name. Check out the gallery for an overview of all currently implemented algorithms.

Installation

To install this package and its dependencies, open the Julia REPL and run

julia> ]add DitherPunk

Examples

using DitherPunk
using Images
using TestImages

img = testimage("fabio_gray_256") # load an image
d = dither(img, FloydSteinberg()) # apply algorithm of your choice

dither!(img, FloydSteinberg())    # or in-place modify image

All algorithms can be used for binary or channel-wise dithering:

Error diffusion Ordered dithering Digital halftoning

All error diffusion, ordered dithering and halftoning methods support custom color palettes. Define your own palette or use those from ColorSchemes.jl:

using DitherPunk
using ColorSchemes

dither(img, FloydSteinberg(), ColorSchemes.flag_us)
flag_us PuOr_6 websafe

DitherPunk also lets you generate optimized color palettes for each input image:

using DitherPunk

ncolors = 8
dither(img, FloydSteinberg(), ncolors)
2 colors 8 colors 32 colors

For a more in-depth introduction, take a look at the docs.


Share your creations in the discussions tab and leave a GitHub Issue if you know of any cool algorithms you'd like to see implemented! 🔬🔧

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].