mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Generate opaque good thumbnails for non-sticker Webm.
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user