READIMAGE

Purpose:

Reads a BMP, GIF or JPEG image file.

Syntax:

READIMAGE("filename")

"filename"

-

A string, the name of the image file.

Returns:

An array.

Example:

W1: readimage(gethome + "data\mandrill.bmp")

W2: readimage(gethome + "data\logo.gif");setaspect(-1)

W3: readimage(gethome + "data\kasha.jpg");setaspect(-1);scalesoff

 

W1 reads and displays the bitmap file "mandrill.bmp".

W2 reads and displays the GIF file "logo.gif" and the aspect ratio of the Window is set to the aspect ratio of the image.

W3 reads and displays the JPEG file "kasha.jpg", the aspect ratio of the Window is set to the aspect ratio of the image and the scales are removed.

Remarks:

READIMAGE currently supports BMP, GIF and JPEG image files. The images are automatically converted to an RGBIMAGE (i.e. 24 bit RGB image).

 

The type of image is determined by the filename extension.

 

Setting the aspect ratio of a Window to -1 causes the aspect ratio to match the aspect ratio of the contained image.

See Also:

GETRGB

IMAGE24

RGBIMAGE

SETASPECT

WRITEBMP