Write image to a file

writeimage image name

Writes the image to a file with the specified name. File format (bmp, gif, jpg, png or tif) is selected by the extension included in the name.

If the name does not contain an absolute path then the file is created in the current directory, as defined in the :pool_cfg,"current_dir variable.

Example:

repeat 36 [repeat 36 [fd 10 rt 10] rt 10]
"img := image {-130 130} {130 -130}
writeimage :img "picture.png

"copy := readimage "picture.png
print :copy

(stampat {250 0} :copy 20)

Output:
(also a drawing in the graphics window)

bitmap260x260

See also:

Image

Table of Content