Jump to content

How do insert images from the clipboard?


izotope

Recommended Posts

Hellow Maksim,

Try Google search :

 

-------------------

uses Clipbrd;

 

//cut

procedure TForm1.Button1Click(Sender: TObject);

Var ARect:TRect;

begin

Clipboard.Assign(Image1.Picture);

with Image1.Canvas do begin

CopyMode:=cmWhiteness; ARect:=Rect(0,0,Image1.Width,Image1.Height);

CopyRect(ARect, Image1.Canvas, ARect); CopyMode:=cmSrcCopy;

end;

end;

 

//copy

procedure TForm1.Button2Click(Sender: TObject);

begin

Clipboard.Assign(Image1.Picture);

end;

 

//paste

procedure TForm1.Button2Click(Sender: TObject);

begin

Image1.Picture.Assign(Clipboard);

end;

-------------------------

 

Just replace :

- image1 by UniImage1

 

Regards.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...