mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-05-08 08:58:38 +01:00
Make autoOrientImage module standalone
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user