From e354df7172efbe25e94f1c6ae5516912dad1d114 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 20 Jul 2018 15:41:45 +0200 Subject: [server] Resize thumbs server side on mismatch The server requests the appropriate size thumbnail from the client so no bandwidth will be wasted. However, due to privacy concerns, the client might actually send a thumb that's smaller than requested, resulting in a tiny thumbnail on the server with huge gray borders. The server will now scale up the image in those cases. We'd actually also scale the image down now if it were too large, but this doesn't happen under normal circumstances. --- src/server/net/client.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/server/net/client.h') diff --git a/src/server/net/client.h b/src/server/net/client.h index 885d4fc..32237bf 100644 --- a/src/server/net/client.h +++ b/src/server/net/client.h @@ -54,7 +54,7 @@ public: void startVncClient(Client const * const to ); void stopVncClient(); void lockScreen(bool); - void requestThumb(const int width, const int height); + void requestThumb(const QSize& size); private: @@ -93,7 +93,7 @@ protected: signals: void authenticating(Client* client, ClientLogin* request); void authenticated(Client* client); - void thumbUpdated(Client* client, const QPixmap& thumb, const QByteArray& rawImage); + void thumbUpdated(Client* client, const QImage& thumb); void vncServerStateChange(Client* client); void vncClientStateChange(Client* client); void stateChanged(); -- cgit v1.2.3-55-g7522