-
Notifications
You must be signed in to change notification settings - Fork 2
raylib.GetImageAlphaBorder
JoeStrout edited this page Apr 29, 2026
·
2 revisions
Get image alpha border rectangle NOTE: Threshold is defined as a percentage: 0.0f -> 1.0f
| Parameter | Default Value | Note |
|---|---|---|
| image | ||
| threshold |
| Condition | Return Value |
|---|---|
| (always) | map |
img = raylib.LoadImage("sprite.png")
// Get the bounding rectangle of non-transparent pixels (threshold 10%)
rec = raylib.GetImageAlphaBorder(img, 0.1)
print "content rect: " + rec.x + "," + rec.y + " " + rec.width + "x" + rec.height
raylib.UnloadImage img