Methods
# createImageFormatter(imageInput) → {Promise.<{formatter: (ImgFormatterNode|ImgFormatterBrowser), error: (string|null)}>}
Creates an instance of the appropriate ImgFormatter (Node or Browser) based on the environment and input type.
Parameters:
Name | Type | Description |
---|---|---|
imageInput |
string
|
Blob
|
The path to the image file, a Blob, or a URL. |
An object containing the formatter or an error message.
Promise.<{formatter: (ImgFormatterNode|ImgFormatterBrowser), error: (string|null)}>