ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Paste a bitmap image into a selected rectangle

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
eljainc Posted - Aug 07 2014 : 08:10:44
Hello,

Can someone tell me how I can insert a bitmap image into a selected region on an ieViewer.Image component. Or is there a way to do a copy and paste from an image to this selected region?

Thanks
Mike
3   L A T E S T    R E P L I E S    (Newest First)
w2m Posted - Aug 07 2014 : 12:39:01
For goodness sakes... take the time to look at the help file. It makes no sense for me to duplicate the help file here.... but the answer is: Proc.SelCopyToClip or Proc.CopyToClipboard.

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
eljainc Posted - Aug 07 2014 : 12:34:07
Bill, thanks for the message.
How do I load a temporary image INTO the clipboard?

is there something like ImageEnView1.Proc.CopyToClipboard ?



A small little correction to the MessageBox.Show() at the end of the code snippet:


begin
ShowMessage('There are no image in the clipboard.');
end;

There is no image in the clipboard.




Mike

w2m Posted - Aug 07 2014 : 12:15:06
Use... TImageEnProc.SelPasteFromClipStretch

Declaration

procedure SelPasteFromClipStretch(MergeAlpha: Boolean=true);


Description

This method pastes the clipboard image to the selected region, stretching the image to fit the selection.
All uncompressed DBI formats are handled (1, 4, 8, 15, 16, 24 and 32 bits).
If clipboard image is 4, 8, 15, 16, 24 or 32 bits, it is converted to 24 bit, otherwise (1 bit) it remains 1 bit.

If MergeAlpha is valid only trasfering image in internal format.
It merges the pasting bitmap alphachannel with the background bitmap.

procedure TForm1.Paste1Click(Sender: TObject);
{ Paste1Click. }
begin
  if ImageEnView1.Proc.IsClipboardAvailable then
  begin
    ImageEnView1.Proc.SaveUndoCaptioned
      ('Paste ' + IntToStr(ImageEnView1.Proc.UndoCount));
    ImageEnView1.Proc.ClearAllRedo;
    if ImageEnView1.Selected then
    begin
      ImageEnView1.Proc.SelPasteFromClip(True);
      ImageEnView1.Update;
    end
    else
      ImageEnView1.Proc.PasteFromClipboard;
    ImageEnView1.Update;
  end
  else
  begin
    ShowMessage('There are no image in the clipboard.');
  end;
end;


Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development