Pasting images from clipboard does not work (only with Windows) lazarus / 32-Linux ---------------------------------------------------------------------- stem · 2020-12-21 22:28 Hi, the following code works perfectly with Windows. But with Linux, the width is always 0. 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   if Clipboard.HasPictureFormat then  begin    try      b.LoadFromClipboardFormat(PredefinedClipboardFormat(pcfBitmap));      showMessage(IntToStr(b.Width));    except      on e: Exception do    begin        showMessage('Exception: ' + e.Message);      end;    end;  end; How can I improve the code so that is works also with Linux? Thank you! stem ---------------------------------------------------------------------- stem · 2020-12-22 12:33 Hi, I found out the answer by myself: If there is an image in the clipboard, the format is pcfPicture in Linux but pcfBitmap in Windows. stem