Skip to content

raylib.ImageDither

JoeStrout edited this page Nov 16, 2026 · 3 revisions

Dither image data to 16bpp or lower (Floyd-Steinberg dithering), given bits per channel for r, g, b, a

Parameters

Parameter Default Value Note
image
rBpp
gBpp
bBpp
aBpp

Return value

None.

Notes

Example

img = raylib.LoadImage("photo.png")
// Dither to 4-bit per channel (Floyd-Steinberg)
raylib.ImageDither img, 4, 4, 4, 4
raylib.ExportImage img, "photo_dithered.png"
raylib.UnloadImage img

Clone this wiki locally