Purpose: Create a new viewer image.
Format: CREATEIMAGE type width height <fill value>
Notes: Use the CREATEIMAGE
statement to set the parameters of the current viewer image. The
type parameter may be a numeric or text representation (see table).
To set all of the pixels to a single value, specify the optional
<fill value> parameter.
| Num | Text | Image Type |
|
|
FLT | 32 Bit Floating Point |
|
|
INT | 16 Bit Signed Integer |
|
|
BYT | 8 Bit Unsigned Byte |
Example:
# Create an image of all zeros and show it.
createimage int 640 480
0
viewer paint
viewer notify
# Make a box of random
numbers
y = 150
loop begin 256
x = 120
loop begin 256
val = random(100)
setpixel val
x y
x = x + 1
loop end
y = y + 1
loop end
viewer paint
viewer notify