mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-30 22:25:12 +00:00
Use QImage instead of QPixmap for theme preview.
Working with QPixmap from non-main thread is not defined.
This commit is contained in:
@@ -59,6 +59,13 @@ const QPixmap &circleMask(int width, int height) {
|
||||
|
||||
} // namespace
|
||||
|
||||
QPixmap PixmapFast(QImage &&image) {
|
||||
Expects(image.format() == QImage::Format_ARGB32_Premultiplied
|
||||
|| image.format() == QImage::Format_RGB32);
|
||||
|
||||
return QPixmap::fromImage(std::move(image), Qt::NoFormatConversion);
|
||||
}
|
||||
|
||||
QImage prepareBlur(QImage img) {
|
||||
auto ratio = img.devicePixelRatio();
|
||||
auto fmt = img.format();
|
||||
|
Reference in New Issue
Block a user