Class: ImageReader
Reads the content of an image file into a Document object (which stores the image file as a Blob).
Implements
Constructors
constructor
• new ImageReader(): ImageReader
Returns
Methods
loadData
▸ loadData(file
, fs?
): Promise
<Document
<Metadata
>[]>
Public method for this reader. Required by BaseReader interface.
Parameters
Name | Type | Default value | Description |
---|---|---|---|
file | string | undefined | Path/name of the file to be loaded. |
fs | GenericFileSystem | defaultFS | fs wrapper interface for getting the file content. |
Returns
Promise<Document[]> A Promise object, eventually yielding zero or one ImageDocument of the specified file.