From f10c0d2558c0551271531a36e86f23f5b5bc66a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20L?= Date: Fri, 3 May 2019 00:02:53 +0200 Subject: [PATCH] TakeSourceScreenshot: use default quality --- src/WSRequestHandler_Sources.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/WSRequestHandler_Sources.cpp b/src/WSRequestHandler_Sources.cpp index b71ec742..c5ce2753 100644 --- a/src/WSRequestHandler_Sources.cpp +++ b/src/WSRequestHandler_Sources.cpp @@ -1345,7 +1345,7 @@ HandlerResponse WSRequestHandler::HandleSetSourceFilterSettings(WSRequestHandler * * @param {String} `sourceName` Source name * @param {String} `pictureFormat` Format of the encoded picture. Can be "png", "jpg", "jpeg" or "bmp" (or any other value supported by Qt's Image module) -* @param {int (optional)} `width` Screenshot width. Defaults to the source's base width. +* @param {int (optional)} `width` Screenshot width. Defaults to the source's base width. * @param {int (optional)} `height` Screenshot height. Defaults to the source's base height. * * @return {String} `sourceName` Source name @@ -1404,7 +1404,6 @@ HandlerResponse WSRequestHandler::HandleTakeSourceScreenshot(WSRequestHandler* r uint8_t* videoData = nullptr; uint32_t videoLinesize = 0; - // TODO asynchronous rendering and encoding obs_enter_graphics(); gs_texrender_t* texrender = gs_texrender_create(GS_RGBA, GS_ZS_NONE); @@ -1447,7 +1446,7 @@ HandlerResponse WSRequestHandler::HandleTakeSourceScreenshot(WSRequestHandler* r QByteArray encodedImgBytes; QBuffer buffer(&encodedImgBytes); buffer.open(QBuffer::WriteOnly); - sourceImage.save(&buffer, pictureFormat, 50); + sourceImage.save(&buffer, pictureFormat); buffer.close(); QString imgBase64(encodedImgBytes.toBase64());