VgaGames 3 - Video man-pages

[.. upper level ..]

VG3_image_load()

Load an image from file.
SYNTAX
struct vg3_image * VG3_image_load(struct vg3_window *wstruct, const char *filename, int rdonly)

FUNCTION PARAMETERS
wstruct Window-struct
filename Image-file, must be in the BMP format
rdonly Whether the image shall be read-only, which means all loaded images of this file share the same data

RETURN VALUE
Returns a pointer to the loaded image or NULL on failure.

ERRORS
On error VG3_errmsg() returns: EINVAL - error in argument ENOSYS - cannot create image ENOMEM - cannot get memory

DESCRIPTION
Load an image from file and return pointer to it. If the image is loaded read-only, other read-only images of the same file share the same data, this will reduce memory, but these images cannot be modified.

SEE ALSO
VG3_image_create() VG3_image_text() VG3_image_clone() VG3_image_clone_reference()