Skip to main content

Imgload

Imgload (Statement)​

Format​

imgload x_position, y_position, file_name
imgload ( x_position, y_position, file_name )
imgload x_position, y_position, scale_expression, file_name
imgload ( x_position, y_position, scale_expression, file_name )
imgload x_position, y_position, scale_expression, rotation_expression, file_name
imgload ( x_position, y_position, scale_expression, rotation_expression, file_name )\

Description​

Load an image or picture from a file and paint it on the Graphics Output Window.
The parameters x_position and y_position represent the location on the screen for the CENTER of the loaded image. This behaviour is different than all of the other graphics statements. The axis of rotation will also be this CENTER point.
The Imgload starement will read in most common image file formats including: BMP (Windows Bitmap), GIF (Graphic Interchange Format),JPG/JPEG (Joint Photographic Experts Group), and PNG (Portable Network Graphics).
Optionally scales size of the loaded image by the defined scale (1=normal size). Also optionally rotates the image by a specified angle around the images center (clockwise in radians).

The coordinates may be whole numbers or fractions. They are measured in pixels unless a Window has been set, in which case they are in the units that window defines.

The picture itself is always measured in pixels. A window places its centre and does not make it any larger or smaller, in the same way that it leaves PenWidth and Font alone. Use the scale argument above to change the size an image is painted at.

See Also​

Font, Imgload, Imgsave, PenWidth, Window

History​

0.9.6lNew to Version
2.3The centre may be given in Window units