-
Notifications
You must be signed in to change notification settings - Fork 2
raylib.ImageResizeCanvas
JoeStrout edited this page Apr 29, 2026
·
2 revisions
Resize canvas and fill with color NOTE: Resize offset is relative to the top-left corner of the original image
| Parameter | Default Value | Note |
|---|---|---|
| image | ||
| offsetX | ||
| offsetY | ||
| newWidth | ||
| newHeight | ||
| fill |
None.
img = raylib.LoadImage("sprite.png")
// Add a 16px border of black around the image
raylib.ImageResizeCanvas img, img.width + 32, img.height + 32, 16, 16, raylib.BLACK
raylib.ExportImage img, "sprite_bordered.png"
raylib.UnloadImage img