-
Notifications
You must be signed in to change notification settings - Fork 2
raylib.ImageAlphaMask
JoeStrout edited this page Apr 29, 2026
·
2 revisions
Apply alpha mask to image NOTE 1: Returned image is GRAY_ALPHA (16bit) or RGBA (32bit) NOTE 2: alphaMask should be same size as image
| Parameter | Default Value | Note |
|---|---|---|
| image | ||
| alphaMask |
None.
img = raylib.LoadImage("sprite.png")
mask = raylib.GenImageGradientRadial(img.width, img.height, 0.0, raylib.WHITE, raylib.BLACK)
raylib.ImageAlphaMask img, mask
raylib.UnloadImage mask
raylib.ExportImage img, "sprite_masked.png"
raylib.UnloadImage img