image.image.load_data
Declaration
lua
image.load_data(data)
Description
Load image from raw binary data (PNG/JPEG).
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
data | string | Required | — | Raw binary image data |
Return Values
| Type | Description |
|---|---|
| image_buffer | Image object |
| nil | If load failed |
Example
lua
local img = image.load_data(png_bytes)