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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Copy selection to selection
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

BionicWave

Germany
33 Posts

Posted - Jul 28 2011 :  03:35:11  Show Profile  Reply
I have two TImageEn.
Both have a selection.
The selection could be different in width and height.
Is it possible to copy the selected pixels from one TImageEn to
the other TImageEn selected region?
My selections are basically all in square form (like 16x16 or 32x32)
It is possible though, that the source has a size of 16x16 and
the destination selection has 32x32 selected.
Thanks in advance.

w2m

USA
1990 Posts

Posted - Jul 28 2011 :  06:17:15  Show Profile  Reply
Probably the easiest way to do this is via the clipboard:
procedure TForm1.Button1Click( Sender: TObject );
begin
  // paste selection contents to the clipboard
  ImageEnView1.Proc.SelCopyToClip;
  // if clipboard contains data valid for TImageEnProc
  if ImageEnView2.Proc.IsClipboardAvailable then
  begin
    // paste the contents of the Clipboard to the ImageEnView2 selected area
    ImageEnView2.Proc.SelPasteFromClip( );
    // or paste the clipboard to the ImageEnView2 selected area, stretching the image to fit the selection
    // ImageEnView2.Proc.SelPasteFromClipStretch;
    ImageEnView2.Update;
  end;
end;


William Miller
Go to Top of Page

BionicWave

Germany
33 Posts

Posted - Jul 28 2011 :  08:47:00  Show Profile  Reply
Hey, thanks.
That works realy well.

Now i got another problem, i'll post it as another thread.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: