Name
SetTransparentThreshold -- set alpha mapping threshold (V9.0)
Synopsis
SetTransparentThreshold(threshold)
Function
This function can be used to specify a threshold value between 0 and 255 that should be used when quantizing alpha transparency to monochrome transparency. For example, when drawing an RGB brush with alpha transparency to a palette display, Hollywood needs to decide which pixels to remap and draw to the display and which pixels to ignore because they are (partly) transparent.

All pixels whose alpha value is less than or equal to the threshold value specified in threshold will be considered transparent. This defaults to 0 which means that only completely invisible pixels will be considered transparent. Depending on the actual image data you want to quantize, it might be necessary to choose a different threshold value here, however.

There is no "one size, fits all" best threshold value here. It all depends on the source image data you want to quantize. Sometimes you might want to have partially transparent pixels in the destination image, sometimes not. That's why it might be necessary to call this function with different threshold values depending on the actual image that needs to be quantized.

Inputs
threshold
desired transparent pixel threshold (must be between 0 and 255); the default is 0

Show TOC