Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IImageUtil

Interface used to abstract implementation details to allow for NodeJS and Browser usage of the library.

Hierarchy

  • IImageUtil

Implemented by

Index

Methods

getBase64Image

  • getBase64Image(img: HTMLImageElement, onEncode: (response: any) => void): void
  • Returns a base64 encoded string for an image.

    Parameters

    • img: HTMLImageElement

      an image.

    • onEncode: (response: any) => void
        • (response: any): void
        • Parameters

          • response: any

          Returns void

    Returns void

    a base 64 encoded string of the image.

loadImageFromURL

  • loadImageFromURL(url: string, onLoad: (image: any) => void, onError: (errorMessage: string) => void): void
  • Loads an image from a URL.

    Parameters

    • url: string
    • onLoad: (image: any) => void
        • (image: any): void
        • Parameters

          • image: any

          Returns void

    • onError: (errorMessage: string) => void
        • (errorMessage: string): void
        • Parameters

          • errorMessage: string

          Returns void

    Returns void

Generated using TypeDoc