Monochrome()

Converts an image to monochrome (black and white).

This method makes irreversible changes to the image. To return to color, you need to redraw the image.

Parameters

Boolean. Specifies whether to convert the image to monochrome. This parameter can take one of the following values:

  • true. Specifies to convert the image to monochrome.
  • false. Specifies to keep the current image color.
Examples
Copy
Graphic.Monochrome(true);

Converts the image to monochrome.