Skip to content

raylib.ExportImageToMemory

JoeStrout edited this page Nov 16, 2026 · 3 revisions

Export an image to a RawData in the file format named by fileType (e.g. ".png"), or null on failure

Parameters

Parameter Default Value Note
image
fileType

Return value

Condition Return Value
(always) map

Notes

Example

img = raylib.GenImageColor(32, 32, raylib.BLUE)
data = raylib.ExportImageToMemory(img, ".png")
print "PNG bytes: " + data.len
raylib.UnloadImage img

Clone this wiki locally