-
Notifications
You must be signed in to change notification settings - Fork 2
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
| Parameter | Default Value | Note |
|---|---|---|
| image | ||
| color | ||
| threshold |
None.
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