2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Generate good thumbnail for animated stickers.

This commit is contained in:
John Preston
2019-07-04 10:20:36 +02:00
parent 7034df49e9
commit 0a63eac4f6
4 changed files with 43 additions and 7 deletions

View File

@@ -894,6 +894,13 @@ void FileLoadTask::process() {
MTP_string(QString()),
MTP_inputStickerSetEmpty(),
MTPMaskCoords()));
if (isAnimation) {
goodThumbnail = fullimage;
{
QBuffer buffer(&goodThumbnailBytes);
goodThumbnail.save(&buffer, "WEBP", kThumbnailQuality);
}
}
} else if (isAnimation) {
attributes.push_back(MTP_documentAttributeAnimated());
} else if (_type != SendMediaType::File) {