mirror of
https://github.com/turt2live/matrix-dimension.git
synced 2024-09-29 20:25:58 +00:00
Improved size of animated images
This commit is contained in:
parent
d89bfd2f22
commit
87cecc9540
@ -141,13 +141,13 @@ class _MatrixStickerBot {
|
||||
thumbUpload = imageUpload;
|
||||
}
|
||||
if (mime === "image/gif" || mime === "image/webp" || mime === "image/avif-sequence") {
|
||||
imageUpload = await resizedImage.webp({nearLossless: true, quality: 60}).toBuffer();
|
||||
imageUpload = await resizedImage.webp({quality: 60, effort: 6}).toBuffer();
|
||||
thumbUpload = await sharp(downImage, {animated: false}).resize({
|
||||
width: size,
|
||||
height: size,
|
||||
fit: 'contain',
|
||||
background: 'rgba(0,0,0,0)',
|
||||
}).webp({quality: 60}).toBuffer();
|
||||
}).webp({quality: 50}).toBuffer();
|
||||
mime = "image/webp";
|
||||
}
|
||||
if (mime === "image/avif") {
|
||||
|
Loading…
Reference in New Issue
Block a user