Fixed bug in the jpeg thumbnail creation

This commit is contained in:
SG-O 2022-07-08 20:45:09 +02:00
parent 0a9d11d8d3
commit 3fdd87a727

View File

@ -156,7 +156,7 @@ class _MatrixStickerBot {
}
if (mime === "image/jpeg") {
imageUpload = await resizedImage.clone().jpeg({quality: 80, chromaSubsampling: '4:4:4'}).toBuffer();
thumbUpload = await resizedImage.avif({quality: 60, chromaSubsampling: '4:2:0'}).toBuffer();;
thumbUpload = await resizedImage.jpeg({quality: 60, chromaSubsampling: '4:2:0'}).toBuffer();;
}
stickerEvent.contentUri = await mx.upload(imageUpload, mime);
stickerEvent.mimetype = mime;