mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +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 QString &path,
|
||||||
const QByteArray &content,
|
const QByteArray &content,
|
||||||
bool gzipSvg) {
|
bool gzipSvg) {
|
||||||
return Images::Read({
|
auto result = Images::Read({
|
||||||
.path = path,
|
.path = path,
|
||||||
.content = content,
|
.content = content,
|
||||||
.maxSize = QSize(kMaxSize, kMaxSize),
|
.maxSize = QSize(kMaxSize, kMaxSize),
|
||||||
.gzipSvg = gzipSvg,
|
.gzipSvg = gzipSvg,
|
||||||
}).image;
|
}).image;
|
||||||
|
if (result.isNull()) {
|
||||||
|
result = QImage(1, 1, QImage::Format_ARGB32_Premultiplied);
|
||||||
|
result.fill(Qt::black);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
QImage GenerateBackgroundImage(
|
QImage GenerateBackgroundImage(
|
||||||
|
|
Loading…
Add table
Reference in a new issue