API Documentation > CorelDRAW > 2025-v26 > Bitmap > IVGBitmap
Bitmap.ConvertToBW method
Converts the bitmap to black and white color mode
Syntax:
Sub ConvertToBW(ByVal RenderType As cdrRenderType, Optional ByVal Intensity As Long = 100, Optional ByVal Threshold As Long = 128, Optional ByVal Halftone As cdrHalftoneType = cdrHalftoneSquare, Optional ByVal HalftoneAngle As Long = 45, Optional ByVal HalftoneSize As Long = 0)
Parameters:
Name Type Description
RenderType
Intensity
Long
Specifies the intensity of the applied color.
Threshold
Long
Specifies the tolerance level for tonal variation for a line art conversion.
Halftone
Specifies a halftone screen.
HalftoneAngle
Long
Specifies the halftone angle.
HalftoneSize
Long
Specifies the lines per unit for a halftone conversion.
Remarks:
The ConvertToBW method converts the bitmap to the black and white color mode.
Examples:
The following VBA example converts all bitmaps on the active page to the black-and-white color mode.
Sub Test()
Dim s As Shape
For Each s In ActivePage.Shapes
  If s.Type = cdrBitmapShape Then

 If s.Bitmap.Mode = cdrRGBColorImage Then


s.Bitmap.ConvertToBW cdrRenderLineArt, , 97

 End If
  End If
Next s 
End Sub