3.1.8 • Published 3 years ago
ku4es-ui-data v3.1.8
Classes
Functions
BinaryFile
Kind: global class
Summary: A binary file abstraction that exposes methods for
reading data from a binary file.
- BinaryFile
- new BinaryFile(byteString)
- instance
- .toBlob(mimeType) ⇒ Blob
- static
new BinaryFile(byteString)
Param |
---|
byteString |
binaryFile.toBlob(mimeType) ⇒ Blob
Kind: instance method of BinaryFile
Access: public
Param | Type | Description |
---|---|---|
mimeType | string | A valid MIMEType |
BinaryFile.parseDataUrl(dataUrl) ⇒ BinaryFile
Kind: static method of BinaryFile
Access: public
Param |
---|
dataUrl |
createBlobFromBinaryArray(binaryArray, mimeType) ⇒ Blob
Kind: global function
Summary: Creates a Blob from a binary array, e.g. Uint16Array
Param | Type |
---|---|
binaryArray | TypedArray |
mimeType | string |
createBlobFromDataUrl(dataUrl) ⇒ Blob
Kind: global function
Summary: Creates a blob from a dataURL
Param | Type |
---|---|
dataUrl | string |
readExifDataInDataUrl(dataUrl) ⇒ Object | Object
Kind: global function
Summary: Reads exif data out of a dataURL
Param | Type |
---|---|
dataUrl | string |
blobFromSrc(src, options) ⇒ Promise.<Blob>
Kind: global function
Summary: Convert an image at src url to blob
Param | Type | Description |
---|---|---|
src | string | path to target image or dataURL |
options | Object | |
options.crossOrigin | boolean | Set to true to support cross origin sources. |
options.mimeType | string | A valid MIME type. |
options.maxAttempts | number | The maximum number of attempts to convert before timeout. |
options.resolution | number | |
options.resolution.x | number | Pixel dimension resolution on the x-axis. |
options.resolution.y | number | Pixel dimension resolution on the y-axis. |
options.orientation | number | Current orientation. A number 1-8 following EXIF Orientation rules. |
dataUrlFromSrc(src, options) ⇒ Promise.<string>
Kind: global function
Summary: Convert an image at src url to a dataURL
Param | Type | Description |
---|---|---|
src | string | path to target image |
options | Object | |
options.crossOrigin | boolean | Set to true to support cross origin sources. |
options.mimeType | string | A valid MIME type. |
options.maxAttempts | number | The maximum number of attempts to convert before timeout. |
options.resolution | number | |
options.resolution.x | number | Pixel dimension resolution on the x-axis. |
options.resolution.y | number | Pixel dimension resolution on the y-axis. |
options.orientation | number | Current orientation. A number 1-8 following EXIF Orientation rules. |
dataUrlFromFile(file, options) ⇒ Promise.<string>
Kind: global function
Summary: Convert an image file to a dataURL
Param | Type | Description |
---|---|---|
file | File | File to convert |
options | Object | |
options.crossOrigin | boolean | Set to true to support cross origin sources. |
options.mimeType | string | A valid MIME type. |
options.maxAttempts | number | The maximum number of attempts to convert before timeout. |
options.resolution | number | |
options.resolution.x | number | Pixel dimension resolution on the x-axis. |
options.resolution.y | number | Pixel dimension resolution on the y-axis. |
options.orientation | number | Current orientation. A number 1-8 following EXIF Orientation rules. |
blobFromFile(file, options) ⇒ Promise.<Blob>
Kind: global function
Summary: Convert an image file to a Blob
Param | Type | Description |
---|---|---|
file | File | File to convert |
options | Object | |
options.crossOrigin | boolean | Set to true to support cross origin sources. |
options.mimeType | string | A valid MIME type. |
options.maxAttempts | number | The maximum number of attempts to convert before timeout. |
options.resolution | number | |
options.resolution.x | number | Pixel dimension resolution on the x-axis. |
options.resolution.y | number | Pixel dimension resolution on the y-axis. |
options.orientation | number | Current orientation. A number 1-8 following EXIF Orientation rules. |