Name
LoadAnimFrame -- load a single animation frame (V1.5)
Synopsis
LoadAnimFrame(id, frame, anim$[, table])
Function
This function loads a single anim frame into the brush specified by id. The animation file is specified by the string anim$. The frame argument specifies which frame to load. If you want to load the last frame, set frame to -1.

The fourth argument is optional. It is a table that can be used to set further options for the loading operation. The following fields of the table can be used:

Transparency:
This field can be used to specify a color in RGB notation that shall be made transparent in the brush.

LoadAlpha:
Set this field to True if the alpha channel of the anim frame shall be loaded, too. Please note that not all animations have an alpha channel and that not all animation formats are capable of storing alpha channel information. This field defaults to False.

Loader:
This tag allows you to specify one or more format loaders that should be asked to load this anim. This must be set to a string containing the name(s) of one or more loader(s). Defaults to default. See Loaders and adapters for details. (V6.0)

Adapter:
This tag allows you to specify one or more file adapters that should be asked to open the specified file. This must be set to a string containing the name(s) of one or more adapter(s). Defaults to default. See Loaders and adapters for details. (V6.0)

LoadTransparency:
If this tag is set to True, the monochrome transparency of the anim frame will be loaded. Please note that this tag is specifically designed for monochrome transparency channels, i.e. a transparent pen in a palette-based anim. If you want to load the alphachannel of an anim, set the LoadAlpha tag to True. This tag defaults to False. (V6.0)

Please note that the Transparency, LoadTransparency and LoadAlpha fields are mutually exclusive. An anim frame can only have one transparency setting!

See LoadAnim for details on supported anim formats.

Inputs
id
brush which shall contain the anim frame
frame
frame to load (ranges from 1 to number of frames); specify -1 if you want to load the last frame
anim$
animation file
table
optional: further options (see above) (V5.1)
Example
LoadAnimFrame(1, 5, "Animations/HugeAnim.gif")
DisplayBrushFX(1, #CENTER, #CENTER, #CROSSFADE)
The above code loads frame 5 of the animation "Animations/HugeAnim.gif" into brush 1 and crossfades brush 1 onto the display.

Show TOC