Apply a threshold to the image

  • Parameters

    • canvas: Canvas

      The Canvas instance

    • threshold: number

      The threshold to apply in a range of 0 to 255

    Returns Canvas