The ImageManager class is a utility class for managing and manipulating images. It provides functionality for saving images to files and drawing various shapes on images.

Constructors

Methods

Constructors

Methods

  • Add quadrilaterals on the image.

    Parameters

    • imageData: undefined | null | ImageData

      The ImageData to modify.

    • quads: undefined | null | Quadrilateral[]

      An array of Quadrilateral objects to be added on the image.

    • colour: number | ColorValue

      An ColorValue as an ARGB colour.

    • thickness: number

      The width of the border.

    Returns undefined | null | ImageData

    • The modified ImageData.
  • Saves an image to the specified path and format. The desired file format is inferred from the file extension provided in the path parameter.

    Parameters

    • imageData: undefined | null | ImageData

      The image to be saved, of type ImageData.

    • path: undefined | null | string

      The absolute file path, name and extension name, as a string, under which the image will be saved.

    • overWrite: boolean

      A flag indicating whether to overwrite the file if it already exists. Defaults to true.

    Returns void