LoadImagePixels

Category: Images and Rendering

Back to System Functions


Signature

LoadImagePixels(imageReference As Integer, pixels() As Integer)

Returns

Void

Description

Loads pixel data from an image into a one-dimensional Integer array in ARGB format (0xAARRGGBB).

The destination array is automatically resized to ImageWidth(imageReference) * ImageHeight(imageReference) before data is written.

This function works with regular images. It does not read from buffer render targets.

Example

Dim imageRef As Integer Dim pixels(1) As Integer imageRef = LoadImage("tiles.png") LoadImagePixels(imageRef, pixels)