Lua:createPNG
Jump to navigation
Jump to search
Creates a PNG image with the requested dimensions.
Use the returned graphic with Image, Picture, Canvas, or other graphical CE objects.
Function Parameters
| Parameter | Type | Description |
|---|---|---|
| width | Integer | Width in pixels. |
| height | Integer | Height in pixels. |
Returns
PortableNetworkGraphic — The new PortableNetworkGraphic object.
Examples
1 local graphic = createPNG(128, 128)
2 -- Draw on or assign the returned graphic.