Make algorithm for finding thumbnails more efficient

This commit is contained in:
Scott Nonnenberg 2018-04-26 12:00:57 -07:00
parent 27a30b3267
commit 403fb1fd60
2 changed files with 15 additions and 6 deletions

View file

@ -117,7 +117,9 @@
const arrayBuffer = await blobToArrayBuffer(blob);
const screenshotObjectUrl = makeObjectUrl(arrayBuffer, 'image/png');
return makeImageThumbnail(size, screenshotObjectUrl);
const thumbnail = await makeImageThumbnail(size, screenshotObjectUrl);
URL.revokeObjectURL(screenshotObjectUrl);
return thumbnail;
}
Whisper.FileInputView = Backbone.View.extend({