LibVNC / libvncserver

LibVNCServer/LibVNCClient are cross-platform C libraries that allow you to easily implement VNC server or client functionality in your program.
GNU General Public License v2.0
1.07k stars 481 forks source link

Can I reduce image quality and change the encoding in the given code snippet? #589

Closed wawahuy closed 1 year ago

wawahuy commented 1 year ago

In the provided code snippet, I want to modify the image quality and encoding settings to suit my requirements. Specifically, I aim to reduce the image quality by 80% to save bandwidth and change the encoding to a more compressed format, such as "tight." I would appreciate guidance on the necessary code modifications to achieve these adjustments

server = rfbGetScreen(&argc, &agv, maxx, maxy, 8, 3, bpp);
server->frameBuffer= (char*)malloc(maxx*maxy*bpp);
server->alwaysShared = TRUE;
server->newClientHook = newClient;
server->ptrAddEvent = mouseCallback;
server->kbdAddEvent = keyCallback;
rfbInitServer(server);
bk138 commented 1 year ago

Please use the community chat for questions in the future :pray:

As for your question: it's the client who asks for an encoding and quality settings, not the server, see https://github.com/rfbproto/rfbproto/blob/master/rfbproto.rst :-)