Global

Methods

makeFileReaderSource(file)

Create a new source from a given file/blob.

Parameters:
Name Type Description
file Blob

The file or blob to read from.

Source:
Returns:

The constructed source

makeRemoteSource(url, options)

Parameters:
Name Type Description
url string
options object
Source:

parseByteRanges(responseArrayBuffer, boundary) → {Array.<Object>}

Parses a list of byteranges from the given 'multipart/byteranges' HTTP response. Each item in the list has the following properties:

  • headers: the HTTP headers
  • data: the sliced ArrayBuffer for that specific part
  • offset: the offset of the byterange within its originating file
  • length: the length of the byterange
Parameters:
Name Type Description
responseArrayBuffer ArrayBuffer

the response to be parsed and split

boundary String

the boundary string used to split the sections

Source:
Returns:

the parsed byteranges

Type
Array.<Object>

parseContentRange(rawContentRange) → {Object}

Parse a 'Content-Range' header value to its start, end, and total parts

Parameters:
Name Type Description
rawContentRange String

the raw string to parse from

Source:
Returns:

the parsed parts

Type
Object

parseContentType(rawContentType) → {Object}

Parse a 'Content-Type' header value to the content-type and parameters

Parameters:
Name Type Description
rawContentType String

the raw string to parse from

Source:
Returns:

the parsed content type with the fields: type and params

Type
Object

parseHeaders(text) → {Object}

Parse HTTP headers from a given string.

Parameters:
Name Type Description
text String

the text to parse the headers from

Source:
Returns:

the parsed headers with lowercase keys

Type
Object

registerTag(tag, name, type, isArray)

Registers a new field tag

Parameters:
Name Type Description
tag number

the numeric tiff tag

name string

the name of the tag that will be reported in the IFD

type number

the tags data type

isArray Boolean

whether the tag is an array

Source:

setLogger(logger)

Parameters:
Name Type Description
logger object

the new logger. e.g console

Source:

Type Definitions

Slice

Properties:
Name Type Description
offset number
length number
Source: