Solved

copying one timage region to another one

Posted on 2001-07-12
2
258 Views
Last Modified: 2010-04-06
Hi guys!

I want a procedure to copy a rectangular region of a timage to another timage in my form. Any ideas?

best regards
Manuel Lopez (lopem)
0
Comment
Question by:lopem
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 6

Expert Comment

by:MannSoft
ID: 6279198
I would use the COPYRECT method.  An example:

DestRect.Left := 0;
DestRect.Top := 0;
DestRect.Right := 50;
DestRect.Bottom := 50;
SourceRect.Left := 0;
SourceRect.Top := 0;
SourceRect.Right := 50;
SourceRect.Bottom := 50;
Image1.Canvas.CopyRect(DestRect, Image2.Canvas, SourceRect);

This would copy a 50x50 square from the top left corner of Image2 into Image1.
0
 
LVL 6

Accepted Solution

by:
MannSoft earned 50 total points
ID: 6279200
Hmm after looking in the help file it looks like it would be easier doing:

DestRect := Rect(0, 0, 50, 50);
SourceRect := Rect(0, 0, 50, 50);

(They are both of type TRect BTW)
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Suggested Courses
Course of the Month7 days, 12 hours left to enroll

632 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