dxGetPixelsFormat | Multi Theft Auto: Wiki Skip to content

dxGetPixelsFormat

Client-side
Server-side
Shared

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


This function returns the format of pixels contained in a string.

Syntax

dxGetPixelsFormat ( )

Code Examples

client

The example loads an image, gets its pixels, and outputs the pixels format. (You can usethisimage to test.)

addEventHandler('onClientResourceStart', resourceRoot, function()
local img = fileOpen('img.jpg')
local pixels = fileRead(img, fileGetSize(img))
local pixelsFormat = dxGetPixelsFormat(pixels)
outputChatBox('Pixels format is: ' .. pixelsFormat)
fileClose(img)
end)