DWVv0.37.0

RawImageLoader

Source: rawImageLoader.js:9

Raw image loader.


Constructor

new RawImageLoader(): RawImageLoader

Instance Methods

load( buffer: ArrayBuffer | string, origin: string | File, index: number, )

Load data.

Parameters

  • buffer (ArrayBuffer | string) — The read data.
  • origin (string | File) — The data origin.
  • index (number) — The data index.

abort()

Abort load.

canLoadExtension(value: string): boolean

Check if the loader supports the input extension.

Parameters

  • value (string) — The extensione.

Returns

  • boolean — True if it can be loaded.

isLoaderName(value: string): boolean

Check if the input is the loader name.

Parameters

  • value (string) — The test name.

Returns

  • boolean — True if input is the loader name.

canLoadMediaType(value: string): boolean

Check if the loader supports the input media type.

Parameters

  • value (string) — The media type.

Returns

  • boolean — True if it can be loaded.

loadFileAs(): number

Get the file content type needed by the loader.

Returns

  • number — One of the 'fileContentTypes'.

loadUrlAs(): number

Get the url content type needed by the loader.

Returns

  • number — One of the 'urlContentTypes'.