ImageFile provides access retrieve an image from disk.

Constructors

Methods

Constructors

  • constructor constructs an ImageNetwork to use.

    Parameters

    • path: string

      path represents the location of the image on disk.

    Returns ImageFile

Methods

  • EncodeBase64 reads an image from disk and converts the image to base64 encoding.

    Returns Promise<[string, null | Error]>

    • A Promise with a base64 string and an error object if the error is not null.