quamotion / remoteviewing

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

VncPixelFormat now also allows copying of bpp16 rgb565 format #169

Open Hofersa opened 1 year ago

Hofersa commented 1 year ago

I had the requirement to handle bpp16rgb565 format from an embedded device vnc server. Therefore I added handling for bpp16 rgb565 format to the Windows Forms project by using the corresponding Bitmap Format. No bitmap conversion is taking place we just assure that the VncPixelFormat uses the same format for source and destination byte pointers. The user needs to assure that the bitmap is created with the correct format. Conversion of VncPixelFormat and System.Drawing.PixelFormat and vice versa has been added for the Example project.

I don't know if this is complete or if issues with code I did not use would occur. I tested if the example project still works with the original bpp32 format as well as the bpp16 rgp565 and it works fine. Have a look and let me know if this is alright.