TiffImageCompressionOptions.SetBitonalThreshold Method

Sets the threshold level to use when producing bitonal images.

Namespace:  BitMiracle.Docotic.Pdf
Assembly:  BitMiracle.Docotic.Pdf (in BitMiracle.Docotic.Pdf.dll)

Syntax

C#
public TiffImageCompressionOptions SetBitonalThreshold(
	int threshold
)
VB
Public Function SetBitonalThreshold ( 
	threshold As Integer
) As TiffImageCompressionOptions

Parameters

threshold
Type: System.Int32
The threshold level to use while producing bitonal images.

Return Value

Type: TiffImageCompressionOptions
The instance used to call the method.

Remarks

The threshold level is used to decide which pixels are white and which are black when converting image data to black-and-white format.

The threshold level value must be between 0 and 255 inclusive. A threshold value 0 means that library should use midpoint between most light and dark pixels as a threshold value.

If the image contains some scanned document or other data with mostly white background pixels and mostly black foreground pixels then threshold level of 189 or higher is recommended to preserve most of the data.

See Also