-
Notifications
You must be signed in to change notification settings - Fork 2
raylib.ImageCrop
JoeStrout edited this page Apr 29, 2026
·
2 revisions
Crop an image to area defined by a rectangle NOTE: Security checks are performed in case rectangle goes out of bounds
| Parameter | Default Value | Note |
|---|---|---|
| image | ||
| crop |
None.
img = raylib.LoadImage("photo.png")
// Keep only the top-left 64x64 region
raylib.ImageCrop img, {x:0, y:0, width:64, height:64}
raylib.ExportImage img, "photo_cropped.png"
raylib.UnloadImage img