Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • ImageUtil

Implements

Index

Methods

getBase64Image

  • getBase64Image(img: HTMLImageElement, onEncode: (response: any) => void): string | void
  • Appropriate for browsers. Uses a canvas element to base64 encode the image.

    Parameters

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

          • response: any

          Returns void

    Returns string | void

loadImageFromURL

  • loadImageFromURL(url: string, onLoad: (image: any) => void, onError: (errorMessage: string) => void): void
  • Appropriate for browsers. Uses an image tag and the load event to load 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