quamotion / remoteviewing

RemoteViewing is a .NET-native VNC client and server library.
Other
261 stars 79 forks source link

Connection failed (UnsupportedPixelFormat) #121

Open PCAssistSoftware opened 4 years ago

PCAssistSoftware commented 4 years ago

Can anyone advise why I get the above error and how I can resolve it

Thank you

limaolm commented 4 years ago

I tried the example and see the same error!

ishkang commented 4 years ago

I am getting the same error!

sergiofactvs commented 3 years ago

Same error

pkntenuki commented 3 years ago

Tried to connect to uvnc server on windows server 2008 R2 - same error. Same procedure with uvnc server on windows 7 - works! Both installations of unvc server are identical (version and settings).

ScottAtBarco commented 1 year ago

For what it's worth, I fixed this problem by using the pixel format for the server depth property in RemoteServer.LibVnc.UpdateServerFormat here:

        private void UpdateServerFormat(VncPixelFormat pixelFormat)
        {
            var serverFormat = this.server.ServerFormat;
            serverFormat.RedShift = (byte)pixelFormat.RedShift;
            serverFormat.GreenShift = (byte)pixelFormat.GreenShift;
            serverFormat.BlueShift = (byte)pixelFormat.BlueShift;
            serverFormat.Depth = (byte)pixelFormat.BitDepth; // <--------- added this line of code

            this.server.ServerFormat = serverFormat;
        }