2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-10-09 13:56:19 +00:00

Generate opaque good thumbnails for non-sticker Webm.

This commit is contained in:
John Preston
2022-01-21 17:57:06 +03:00
parent d18e28978a
commit 044c7f3ce9
3 changed files with 9 additions and 7 deletions

View File

@@ -58,7 +58,11 @@ enum class FileType {
QByteArray data,
FileType type) {
if (type == FileType::Video || type == FileType::VideoSticker) {
return ::Media::Clip::PrepareForSending(path, data).thumbnail;
auto result = ::Media::Clip::PrepareForSending(path, data);
if (result.isWebmSticker && type == FileType::Video) {
result.thumbnail = Images::Opaque(std::move(result.thumbnail));
}
return result.thumbnail;
} else if (type == FileType::AnimatedSticker) {
return Lottie::ReadThumbnail(Lottie::ReadContent(data, path));
} else if (type == FileType::Theme) {