Needs["GUIKit`"] Create a 5×5 image with five indexed colors, with all pixels set to black:
| Out[2]= |  |
| Out[3]= |  |
Set all pixels to white:
| Out[5]= |  |
Loop 100 times, setting all pixels to random values:
| Out[7]= |  |
Loop 100 times, setting a random cell in the first row to a random value within each loop:
| Out[9]= |  |
Repaint the image to see the result:
| Out[11]= |  |
Combine the previous two method calls by giving True as the last argument to "setImagePixel":
| Out[13]= |  |
Loop 100 times, setting a random column to a random value:
| Out[15]= |  |
Display the grid:
| Out[18]= |  |
Set the grid color to a custom value:
| Out[21]= |  |
Scale the image to fit the size of the panel (after resizing):
| Out[24]= |  |
Preserve the aspect ratio:
| Out[27]= |  |
Change the origin of the image:
| Out[30]= |  |
The method "fillImagePixels" fills individual pixels of the image:
| Out[32]= |  |
The method "fillImagePixelArray" fills an array of explicit locations:
| Out[34]= |  |
It also fills a region given by an origin {x, y} value coupled with relative offset locations:
| Out[36]= |  |
| Out[38]= |  |
The method "fillImagePixelRect" fills a rectangular region:
| Out[40]= |  |
With "setImagePixelRect", the region can be also be specified by its top-left location:
| Out[42]= |  |
|