Class: ImageProvider

ImageProvider

new ImageProvider(heifReader, hevcDecoder)

Decoder for HEIF files. Glues HEIFReader and HevcDecoder together.
Parameters:
Name Type Description
heifReader HEIFReader HEIF file reader object to read hevc encoded data.
hevcDecoder HevcDecoder HEVC decoder object to decode hevc encoded data.
Source:

Classes

Payload
RequestContext

Methods

getDisplayHeight(fileInfo, contextId) → {number}

A convenience method to get display height of given context.
Parameters:
Name Type Description
fileInfo HEIFReader~FileInfo FileInfo structure.
contextId number Id of the context.
Source:
Returns:
Display height.
Type
number

getDisplayWidth(fileInfo, contextId) → {number}

A convenience method to get display width of given context.
Parameters:
Name Type Description
fileInfo HEIFReader~FileInfo FileInfo structure.
contextId number Id of the context.
Source:
Returns:
Display width.
Type
number

getItemIdByThumbnailId(fileInfo, contextId, thumbnailId) → {number}

A convenience function to get item id by thumbnail id.
Parameters:
Name Type Description
fileInfo HEIFReader~FileInfo FileInfo structure.
contextId number Id of the context.
thumbnailId number Id of the thumbnail.
Source:
Returns:
Id of the corresponding item.
Type
number

getMasterContextId(fileInfo) → {number}

A convenience method to get master context id or null.
Parameters:
Name Type Description
fileInfo HEIFReader~FileInfo FileInfo structure.
Source:
Returns:
Master contextID or null if no master context is present.
Type
number

getMasterIds(fileInfo) → {Array.<number>}

A convenience function to get master ids.
Parameters:
Name Type Description
fileInfo HEIFReader~FileInfo FileInfo structure.
Source:
Returns:
Array of master item IDs.
Type
Array.<number>

getMetaBoxMasterIds(fileInfo) → {Array.<number>}

A convenience function to get meta box master ids.
Parameters:
Name Type Description
fileInfo HEIFReader~FileInfo FileInfo structure.
Source:
Returns:
Array of thumbnail item IDs.
Type
Array.<number>

getMetaBoxThumbnailIds(fileInfo) → {Array.<number>}

A convenience function to get meta box thumbnail ids.
Parameters:
Name Type Description
fileInfo HEIFReader~FileInfo FileInfo structure.
Source:
Returns:
Array of thumbnail item IDs.
Type
Array.<number>

getThumbnailContextId(fileInfo) → {number}

A convenience method to get thumbnail context id or null.
Parameters:
Name Type Description
fileInfo HEIFReader~FileInfo FileInfo structure.
Source:
Returns:
Thumbnail contextID or null if no thumbanails are present.
Type
number

getThumbnailIdByItemId(fileInfo, contextId, itemId) → {number}

A convenience function to get thumbnail id by item id.
Parameters:
Name Type Description
fileInfo HEIFReader~FileInfo FileInfo structure.
contextId number Id of the context.
itemId number Id of the item.
Source:
Returns:
Id of the corresponding thumbnail or null if there is no thumbnail.
Type
number

getThumbnailIds(fileInfo) → {Array.<number>}

A convenience function to get thumbnail ids.
Parameters:
Name Type Description
fileInfo HEIFReader~FileInfo FileInfo structure.
Source:
Returns:
Array of thumbnail item IDs.
Type
Array.<number>

requestImageData(contextId, itemIds, callback)

Request decoded image data for given item id's.
Parameters:
Name Type Description
contextId number Id of the context.
itemIds Array.<number> Array of item id's to be decoded.
callback function Callback function that receives the payload as a parameter.
Source: