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
Inherited from
Methods
loadData()
Parameters
• filePath: string
Returns
Inherited from
Defined in
packages/core/dist/schema/index.d.ts:187
loadDataAsContent()
loadDataAsContent(
fileContent
):Promise
<Document
<Metadata
>[]>
Public method for this reader. Required by BaseReader interface.
Parameters
• fileContent: Uint8Array
Returns
Promise<Document[]> A Promise object, eventually yielding zero or one ImageDocument of the specified file.
Overrides
Defined in
packages/llamaindex/src/readers/ImageReader.ts:15
addMetaData()
static
addMetaData(filePath
): (doc
,index
) =>void
Parameters
• filePath: string
Returns
Function
Parameters
• index: number
Returns
void
Inherited from
Defined in
packages/core/dist/schema/index.d.ts:188