Backgrounds

Game Maker 8

Backgrounds

The following functions will give you information about a background:

background_exists(ind) Returns whether a background with the given index exists.
background_get_name(ind) Returns the name of the background with the given index.
background_get_width(ind) Returns the width of the background with the given index.
background_get_height(ind) Returns the height of the background with the given index.
In certain situations you might want to save the bitmap corresponding the background to a file. For this the following function can be used:

background_save(ind,fname) Saves the background ind to the file with the name fname. This must be a .png file. Only available in the Pro Edition.