Read image from a file
readimage name
Reads in and returns an image from a file with the specified name. The following formats are accepted:
bmp, gif, jpg, png, tif.
If the name does not contain an absolute path then the file is assumed to be in the current directory,
specified with the :pool_cfg,"current_dir
variable.
The name can be also a http adress.
Example:
repeat 36 [repeat 36 [fd 10 rt 10] rt 10]
"img := image {-130 130} {130 -130}
writeimage :img "image.png
"copy := readimage "image.png
print :copy
(stampat {250 0} :copy 20)
Output:
(also a drawing in the graphics window)
bitmap260x260
See also:
Image
Table of Content