Bitmap paste and copy does not work for me lazarus / 39-Graphics ---------------------------------------------------------------------- hakelm · 2013-11-15 14:58 I put a bitmap on the clipboard with: Clipboard.assign(bmp); and I can paste it into other applications but when I try to retrieve it with my own Lazarus program, it has the format CF_Picture and   if Clipboard.HasFormat(CF_Picture) then begin     pic:=tpicture.Create;     pic.LoadFromClipboardFormat(CF_Picture); generates the exception: Exception class "EInvalidGraphic" at $00000000005BAF81 with message "Unsupported clipboard format: Delphi Picture" What am I missing? Any tip is highly appreciated. I use Lazarus 1.0.12, Ubuntu 12.04 on an AMD64. Håkan ---------------------------------------------------------------------- hakelm · 2013-11-16 13:05 Partially solved, the code below works. The fact that my earlier code doesn't work is still a mystery to me and it would be nice if someone could explain why. To copy: ...     Clipboard.Open;     Clipboard.assign(bmp);     Clipboard.Close;    ... To paste:   if Clipboard.HasPictureFormat then begin     bmp:=tbitmap.Create;     bmp.Assign(Clipboard);      .... ---------------------------------------------------------------------- ausdigi · 2013-11-19 05:16 This also works but I don't understand it all myself but think you should probably be doing everything with CF_Bitmap and, therefore, using a TBitmap as you have the second time. Code: [Select]pic.Bitmap.LoadFromClipboardFormat(CF_Picture);