Skip to content

raylib.ImageFromImage

JoeStrout edited this page Apr 29, 2026 · 2 revisions

Create an image from another image piece

Parameters

Parameter Default Value Note
image
rec

Return value

Condition Return Value
(always) map

Notes

Example

img = raylib.LoadImage("spritesheet.png")
// Extract a 64x64 region from the sheet
frame = raylib.ImageFromImage(img, {x:0, y:0, width:64, height:64})
raylib.ExportImage frame, "frame0.png"
raylib.UnloadImage frame
raylib.UnloadImage img

Clone this wiki locally