Methods
getBase64Image
- getBase64Image(img: HTMLImageElement, onEncode: (response: any) => void): string | void
-
Parameters
-
img: HTMLImageElement
-
onEncode: (response: any) => void
Returns string | void
loadImageFromURL
- loadImageFromURL(url: string, onLoad: (image: any) => void, onError: (errorMessage: string) => void): void
-
Parameters
-
url: string
-
onLoad: (image: any) => void
-
onError: (errorMessage: string) => void
-
- (errorMessage: string): void
Returns void
Appropriate for browsers. Uses a canvas element to base64 encode the image.