SetTransparentThreshold(threshold)
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.