Make `autoOrientImage` module standalone

This commit is contained in:
Daniel Gasienica 2018-02-09 16:57:19 -05:00
parent c285bf5e33
commit d07433e3cf
1 changed files with 3 additions and 1 deletions

View File

@ -1,3 +1,5 @@
const loadImage = require('blueimp-load-image');
// File | Blob | URLString -> LoadImageOptions -> Promise<DataURLString>
//
// Documentation for `options`:
@ -12,7 +14,7 @@ exports.autoOrientImage = (fileOrBlobOrURL, options) => {
);
return new Promise((resolve, reject) => {
window.loadImage(fileOrBlobOrURL, canvasOrError => {
loadImage(fileOrBlobOrURL, canvasOrError => {
if (canvasOrError.type === 'error') {
const error = canvasOrError;
reject(error);