Skip to content

raylib.ImageDither

JoeStrout edited this page Apr 29, 2026 · 2 revisions

Dither image data to 16bpp or lower (Floyd-Steinberg dithering) NOTE: In case selected bpp do not represent a known 16bit format, dithered data is stored in the LSB part of the unsigned short

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