CREATEIMAGE

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.
 

Viewer Image Types
Num   Text  Image Type
  1
 FLT 32 Bit Floating Point
  2
 INT 16 Bit Signed Integer
  3
 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

See Also:   SETPIXEL   GETPIXEL