From b2fa269515d4469c15b0380596e443c5e6bc575a Mon Sep 17 00:00:00 2001 From: Tobias Fella Date: Mon, 10 Oct 2022 20:13:01 +0200 Subject: [PATCH] Send correct width and height for images --- src/neochatroom.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/neochatroom.cpp b/src/neochatroom.cpp index de01dbd2a..08c86a4db 100644 --- a/src/neochatroom.cpp +++ b/src/neochatroom.cpp @@ -99,7 +99,7 @@ QCoro::Task NeoChatRoom::doUploadFile(QUrl url, QString body) QFileInfo fileInfo(url.toLocalFile()); EventContent::TypedBase *content; if (mime.name().startsWith("image/")) { - QImage image; + QImage image(url.toLocalFile()); content = new EventContent::ImageContent(url, fileInfo.size(), mime, image.size(), fileInfo.fileName()); } else if (mime.name().startsWith("audio/")) { content = new EventContent::AudioContent(url, fileInfo.size(), mime, fileInfo.fileName());