M MY Multiplayer: Wiki
Side
Kind

dxGetPixelsFormat

Client

Detects the format of an image held in a string.

string|false dxGetPixelsFormat(string pixels)

Parameters

NameTypeDescription
pixelsstringThe pixels.

Returns

plain, png, jpeg or dds, or false when it was not recognised.

Example

local file = fileOpen("images/photo.jpg", true)
local pixels = fileRead(file, fileGetSize(file))
fileClose(file)
print(dxGetPixelsFormat(pixels))

See also