Implement thumbnail creation for heic images

This commit is contained in:
schlagmichdoch 2023-12-11 17:19:56 +01:00
parent 3238d582cc
commit 86d1aa3560
5 changed files with 88 additions and 19 deletions

View file

@ -450,13 +450,12 @@ class Peer {
Events.fire('set-progress', {peerId: this._peerId, progress: 0.8, status: 'prepare'})
let dataUrl;
let dataUrl = '';
if (files[0].type.split('/')[0] === 'image') {
try {
dataUrl = await getResizedImageDataUrl(files[0], 400, null, 0.9);
dataUrl = await getThumbnailAsDataUrl(files[0], 400, null, 0.9);
} catch (e) {
dataUrl = '';
console.error(e);
}
}