I am looking for a method of updating an Image rapidly from data stored in a 2D matrix. I currently use the following code for each pixel:
Image1->Canvas->Pixels[x][y] = greyscale;
My image is a 512x512 array so the above line is part of an embedded for loop that iterates 262,144 times to display the whole image.
Surely there is a more efficient way of getting data in one block to an image, as opposed to doing it one pixel at a time?
Any recommendations?
Thanks in advance.
Image1->Canvas->Pixels[x][y] = greyscale;
My image is a 512x512 array so the above line is part of an embedded for loop that iterates 262,144 times to display the whole image.
Surely there is a more efficient way of getting data in one block to an image, as opposed to doing it one pixel at a time?
Any recommendations?
Thanks in advance.