QuantizeBrush(id[, t])
QuantizeBrush(id[, colors, dither])
Starting with Hollywood 9.0, this function uses a new syntax with an optional table argument to specify additional options. The following table tags are currently recognized:
Colors:
Depth
table tag to specify the desired number of colors for the brush
(see below).
Dither:
True
to enable or to False
to disable dithering. Defaults to True
.
Depth:
Colors
tag (see above). (V9.0)
Palette:
True
if you want QuantizeBrush()
to convert your brush into a
palette brush. Note that by default QuantizeBrush()
will not create palette
brushes even though it effectively always reduces colors to a number that
would fit into a palette. Still, it doesn't do so due to compatibility reasons
because palette brushes weren't supported before Hollywood 9.0. So if you want
QuantizeBrush()
to create a palette brush for you, you must set this tag to
True
. Defaults to False
. (V9.0)
TransparentPen:
Palette
has been set to True
(see above) and the brush to be quantized has
a mask, all invisible pixels will be set to the number of the pen specified here
so that this pen will become the transparent pen. Defaults to 0 which means tha
the first pen should be made transparent by default. (V9.0)
TransparentColor:
Palette
has been set to True
and the brush to be quantized has a mask,
the brush's transparent pen will be set to the color you specify here. This
color must be specified as an RGB color. If this tag is not
set, the transparent pen won't be set to any specific color. (V9.0)
QuantizeBrush(1, 32)Convert brush 1 to a 32-color brush with dithering enabled