DarkBASIC Professional Help File

DX11 GET IMAGE PIXEL BUFFER SIZE

Returns the size, in bytes, of the pixel data belonging to the specified image.
You can also use DX11 GET IMAGE PIXEL BUFFER WIDTH, DX11 GET IMAGE PIXEL BUFFER HEIGHT and DX11 GET IMAGE FORMAT to figure this out. Also, the size of each pixel is:

DX11 GET IMAGE PIXEL BUFFER SIZE(img) / (DX11 GET IMAGE PIXEL BUFFER WIDTH()DX11 GET IMAGE PIXEL BUFFER HEIGHT)

Take note that the specified image must be locked for this function to succeed.
Also beware that an image block may be padded to correspond to a certain size as determined by the GPU. The size returned by this function is of the entire
pixel buffer, including any such padding.

Syntax

    Return Dword = DX11 GET IMAGE PIXEL BUFFER SIZE(img)

Parameters

    img

> Dword
> The image to retrieve the size of the pixel data for.

Returns

The size of the pixel data belonging to the locked image, or 0 if the specified image isn't locked when this function is called.

See also

IMAGE Functions Menu
DX11 Function Categories