SaveBrush(id, f$[, transcolor, fmt, table])
idto the file specified by
f$. If you specify the optional argument
transcolor, all transparent areas of the brush will be filled with this color. The
fmtargument specifies the desired picture format for the file (defaults to
#IMGFMT_BMPwhich writes a 24-bit BMP picture).
Starting with Hollywood 2.5, you can also pass
#IMGFMT_PNG as the format.
SaveBrush() will then save the brush as a PNG picture. If the brush has
an alpha channel, this alpha channel will also be written to the PNG
Starting with Hollywood 4.0, you can also pass
#IMGFMT_JPEG as the format.
SaveBrush() will then save the brush as a JPEG picture. Note that the
JPEG format does not support alpha channels. The
Quality field in the
optional table argument allows you to specify the quality level for the
JPEG image (valid values are 0 to 100 where 100 is the best quality).
Starting with Hollywood 4.5, you can also pass
as format. If you use
#IMGFMT_GIF, the brush will be saved as a GIF image.
Because GIF images are always palette based, you can use the
Dither tags of the optional table argument to specify the number of
palette entries to allocate for the image and whether or not dithering
shall be applied. If you choose
#IMGFMT_ILBM, the brush will always be
saved as a true color (24 bit) ILBM image.
The optional table argument allows you to configure further parameters:
Trueto enable dithering. This field is only handled when the destination format is palette-based. Defaults to
Falsewhich means no dithering.
Here is an overview that shows which formats support which tags:
Please note that technically it is also possible to create palette-based
BMP, PNG, and ILBM images. However, Hollywood currently does not support
this and will always create true color (24 bit) images for these formats.
This is why you cannot use the
Colors tags for these
#NOTRANSPARENCYfor no transparency
#IMGFMT_ILBM(V4.0) (defaults to