[id] = LoadPalette(id, filename$[, table])
filename$
into memory and
assigns the identifier id
to it. If you pass Nil in id
, LoadPalette()
will automatically choose an identifier and return it.
The palette specified in filename$
can either be in the IFF ILBM palette format,
as established by Deluxe Paint, or, alternatively, filename$
can also
be a normal image file that contains a palette. In that case, LoadPalette()
will simply extract the palette from the image file.
The third 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:
Loader:
Adapter:
UserTags:
This command is also available from the preprocessor: Use @PALETTE to preload palettes.
LoadPalette(1, "DPaint32.pal")This loads "DPaint32.pal" as palette 1.