dxGetPixelsSize
Client
Returns the width and height of an image held in a string (plain, png, jpeg or dds).
int, int|false dxGetPixelsSize(string pixels)
Parameters
| Name | Type | Description |
|---|---|---|
| pixels | string | The pixels. |
Returns
The width and the height, or false when the format was not recognised.
Example
local file = fileOpen("images/photo.png", true)
local pixels = fileRead(file, fileGetSize(file))
fileClose(file)
local w, h = dxGetPixelsSize(pixels)