If I copy an image with
clipboard.Assign(image1.Picture.Graphic);
I can paste the result into say Gimp or Thunderbird but not into for instance Libre Office. Looking into the clipboard formats with the code below I get
*********************
0 image/jpeg: 120
*********************
If I on the other hand copy an image from Gimp or a browser I get format contents like:
*********************
0 TIMESTAMP: 140
1 TARGETS: 137
2 MULTIPLE: 139
3 SAVE_TARGETS: 141
4 image/png: 119
5 image/tiff: 160
6 image/x-icon: 161
7 image/x-ico: 162
8 image/x-win-bitmap: 163
9 image/bmp: 117
10 image/x-bmp: 164
11 image/x-MS-bmp: 165
12 image/jpeg: 120
13 : 0
14 : 0
15 : 65765505
16 : 140737354051384
17 : 0
18 : 0
19 : 0
20 : 0
21 : 0
22 : 0
23 : 0
24 : 0
25 : 0
*********************
and the clipboard content seems to be acceptable by most applications.
How can I get the same or similar behaviour in a Lazarus application?
Thanks for any tip.
H
procedure TForm1.BitBtn1Click(Sender: TObject);
var n:integer; l:tstringlist;
begin
writeln('*********************');
l:=tstringlist.create;
clipboard.SupportedFormats(l);
for n:=0 to l.Count-1 do
writeln(n,' ',l[n],': ',clipboard.formats[n]);
writeln('*********************');
l.free;
end;