Skip to content

raylib.ImageAlphaClear

JoeStrout edited this page Apr 29, 2026 · 2 revisions

Clear alpha channel to desired color NOTE: Threshold defines the alpha limit, 0.0f to 1.0f

Parameters

Parameter Default Value Note
image
color
threshold

Return value

None.

Notes

Example

img = raylib.LoadImage("sprite.png")
// Make pixels with alpha < 10% fully transparent
raylib.ImageAlphaClear img, raylib.BLANK, 0.1
raylib.ExportImage img, "sprite_clean.png"
raylib.UnloadImage img

Clone this wiki locally