Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Functions

createBlankGifImageData

  • createBlankGifImageData(width: number, height: number): Uint8Array
  • Returns a blank GIF image with the specified dimensions.

    Parameters

    • width: number

      The width of the image in pixels.

    • height: number

      The height of the image in pixels.

    Returns Uint8Array

createBlankSvgImageDataUri

  • createBlankSvgImageDataUri(width: number, height: number, fillColor: string): string
  • Returns an blank SVG image with the specified dimensions and background color. The image result is returned as a base64 data URI

    Parameters

    • width: number

      The width of the image in pixels

    • height: number

      The height of the image in pixels

    • fillColor: string

      The fillColor. A hex-string or the keyword 'none' for a transparent picture

    Returns string

getImageDimensions

  • getImageDimensions(uintArray: Uint8Array): IDimensions | null
  • Returns the dimensions of the specified image, or null if unable to do so.

    Parameters

    • uintArray: Uint8Array

      The image data.

    Returns IDimensions | null

waitUntilImageLoaded

  • waitUntilImageLoaded(element: HTMLImageElement, timeoutMs: number): Promise<void>
  • Returns a promise that will resolve when the provided image element has loaded, or when the timeoutMs number of milliseconds have elapsed.

    Parameters

    • element: HTMLImageElement

      The element to wait for.

    • timeoutMs: number

      The timeout in milliseconds.

    Returns Promise<void>

Generated using TypeDoc