TPortableNetworkGraphic & Canvas.Draw vs Remote Desktop Connection lazarus / 39-Graphics ---------------------------------------------------------------------- upsidasi · 2022-03-08 14:33 Hi, I wrote a simple piece of code to save a png file using TPortableNetworkGraphic: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i     img := TPortableNetworkGraphic.Create();    img.Width := 100;    img.Height := 100;     img.Canvas.Brush.Color := clWhite;    img.Canvas.FillRect(0, 0, img.Width, img.Height);    img.Canvas.Pen.Color := clBlack;    img.Canvas.Line(0, 0, img.Width, img.Height);     img.SaveToFile('test.png');  It works fine when I work directly on my Linux computer (test_ok.png), but it generates an empty image (test_RDP.png) when I access my Linux over RDP using Remote Desktop Connection from Windows. I also tested basically the same code but with TBitmap which works fine in both conditions. Sadly, both TBitmap and TPortableNetworkGraphic cannot be drawn using Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i Canvas.Draw(x, y, TGrapihcs) over RDP while using Remote Desktop Connection (see "BMP Draw" button in the attached project). Here are my versions:   Lazarus: 2.0.10   FPC: 3.2.0 Attached a zip containing the project to reproduce the issues and the images test_ok.png and test_RDP.png.