mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
Use Images::Read instead of App::readImage.
This commit is contained in:
@@ -55,7 +55,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "mainwidget.h"
|
||||
#include "mainwindow.h"
|
||||
#include "facades.h"
|
||||
#include "app.h"
|
||||
#include "styles/style_settings.h"
|
||||
#include "styles/style_layers.h"
|
||||
|
||||
@@ -626,9 +625,11 @@ void ChooseFromFile(
|
||||
}
|
||||
}
|
||||
|
||||
auto image = result.remoteContent.isEmpty()
|
||||
? App::readImage(result.paths.front())
|
||||
: App::readImage(result.remoteContent);
|
||||
auto image = Images::Read({
|
||||
.path = result.paths.isEmpty() ? QString() : result.paths.front(),
|
||||
.content = result.remoteContent,
|
||||
.forceOpaque = true,
|
||||
}).image;
|
||||
if (image.isNull() || image.width() <= 0 || image.height() <= 0) {
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user