Fix thumbnail creation on very large images or images with extreme dimensions (#332)

This commit is contained in:
schlagmichdoch 2024-11-11 18:16:20 +01:00
parent ab67c5858d
commit 00d2757fdc
3 changed files with 60 additions and 21 deletions

View file

@ -281,10 +281,8 @@ class PeersUI {
if (files[0].type.split('/')[0] === 'image') {
try {
let imageUrl = await getThumbnailAsDataUrl(files[0], 80, null, 0.9);
let imageUrl = await getThumbnailAsDataUrl(files[0], 80, 80, 0.9);
this.$shareModeImageThumb.style.backgroundImage = `url(${imageUrl})`;
this.$shareModeImageThumb.removeAttribute('hidden');
} catch (e) {
console.error(e);