Solved

copying one part of an image to another image...

Posted on 2001-07-12
1
148 Views
Last Modified: 2010-05-18
Hi guys,

I need a procedure to copy a rectangular region of an image (a TImage) to another one. Any ideas?

best regards,
Manuel Lopez (lopem)
0
Comment
Question by:lopem
1 Comment
 
LVL 14

Accepted Solution

by:
DragonSlayer earned 50 total points
ID: 6279219
Here, I copy a 100x100 region from Image1 to Image2 when the user clicks on Image1

procedure TForm1.Image1MouseDown(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
begin
  Image2.Canvas.CopyRect(Rect(0, 0, 100, 100),
    Image1.Canvas,
    Rect(X, Y, X + 100, Y + 100));
end;
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Wininet read php file from internet issue 6 92
Mydac connection data base issue 3 159
Newbie Thread Programming 1 155
Need Help Delphi 2010 CheckBox1 Stored value in memo 13 67
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question