Skip to main content

Class: ImageReader

Reads the content of an image file into a Document object (which stores the image file as a Blob).

Extends

Constructors

new ImageReader()

new ImageReader(): ImageReader

Returns

ImageReader

Inherited from

FileReader.constructor

Methods

loadData()

loadData(filePath): Promise<ImageDocument<Metadata>[]>

Parameters

filePath: string

Returns

Promise<ImageDocument<Metadata>[]>

Inherited from

FileReader.loadData

Defined in

packages/core/schema/dist/index.d.ts:188


loadDataAsContent()

loadDataAsContent(fileContent): Promise<ImageDocument<Metadata>[]>

Public method for this reader. Required by BaseReader interface.

Parameters

fileContent: Uint8Array

The content of the file.

Returns

Promise<ImageDocument<Metadata>[]>

Promise<Document[]> A Promise object, eventually yielding zero or one ImageDocument of the specified file.

Overrides

FileReader.loadDataAsContent

Defined in

packages/readers/image/dist/index.d.ts:13


addMetaData()

static addMetaData(filePath): (doc, index) => void

Parameters

filePath: string

Returns

Function

Parameters

doc: BaseNode<Metadata>

index: number

Returns

void

Inherited from

FileReader.addMetaData

Defined in

packages/core/schema/dist/index.d.ts:189