mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2025-04-20 15:06:15 -04:00
Implement thumbnail creation for heic images
This commit is contained in:
parent
3238d582cc
commit
86d1aa3560
5 changed files with 88 additions and 19 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue