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:
@@ -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