mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-15 21:57:10 +02:00
Check chat background read result.
This commit is contained in:
parent
849ce310c4
commit
abcf55c498
1 changed files with 6 additions and 1 deletions
|
@ -909,12 +909,17 @@ QImage PrepareImageForTiled(const QImage &prepared) {
|
|||
const QString &path,
|
||||
const QByteArray &content,
|
||||
bool gzipSvg) {
|
||||
return Images::Read({
|
||||
auto result = Images::Read({
|
||||
.path = path,
|
||||
.content = content,
|
||||
.maxSize = QSize(kMaxSize, kMaxSize),
|
||||
.gzipSvg = gzipSvg,
|
||||
}).image;
|
||||
if (result.isNull()) {
|
||||
result = QImage(1, 1, QImage::Format_ARGB32_Premultiplied);
|
||||
result.fill(Qt::black);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
QImage GenerateBackgroundImage(
|
||||
|
|
Loading…
Add table
Reference in a new issue