Category: Images and Rendering
UpdateImagePixels(imageReference As Integer, pixels() As Integer)
Void
Updates an image from a one-dimensional Integer array of ARGB values (0xAARRGGBB).
The array length must exactly match ImageWidth(imageReference) * ImageHeight(imageReference).
If the array length is incorrect, LunarBasic raises a runtime error with expected and actual pixel counts and source location details.
This function updates regular images only and does not accept buffer render targets.
Dim imageRef As Integer
Dim pixels(1) As Integer
imageRef = LoadImage("tiles.png")
LoadImagePixels(imageRef, pixels)
UpdateImagePixels(imageRef, pixels)