SaveIcon(id, f$[, fmt, t])
id
to the file specified by f$
in
By default, the icon will be saved in Hollywood's custom icon format based on PNG.
You can change this by passing a different icon format constant in the fmt
argument. The only icon format supported internally by Hollywood is #ICNFMT_HOLLYWOOD
,
which is Hollywood's custom icon format based on PNG. Additional icon formats might
be made available by Hollywood plugins.
Note that although Hollywood's custom icon format stores icons as seemingly normal
PNG images, they contain additional metadata which is why you mustn't edit them with
your favourite image manipulation tool because that might lead to the loss of said
metadata. Hollywood icons should only ever be created by using the SaveIcon()
function.
Also note that when using Hollywood's custom icon format the icon specified in id
mustn't contain any vector graphics. Hollywood icons only support raster graphics because
they are based on PNG which is a raster graphics format. If you want to use vector
graphics in an icon, you can create such icons using the CreateIcon()
function and the @ICON preprocessor command.
Finally, icons in Hollywood's custom icon format also mustn't contain any
palette graphics. That is why SaveIcon()
will fail if the icon specified
by id
contains palette images.
Starting with Hollywood 9.0, SaveIcon()
accepts an optional table argument that
can contain the following options:
Compression:
True
or False
to enable or disable compression. Defaults to True
. (V9.0)
Adapter:
UserTags:
#ICNFMT_HOLLYWOOD
) (V9.0)