ImageFile provides access retrieve an image from disk.

Constructors

Properties

Methods

Constructors

  • constructor constructs an ImageNetwork to use.

    Parameters

    • path: string

      path represents the location of the image on disk.

    Returns ImageFile

Properties

base64: null | string
path: string

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.