Solved

Delphi Copy Part of One Bitmap to Bitmap

Posted on 2009-07-10
3
2,128 Views
Last Modified: 2013-11-22
srcBMP
destBMP

I want to copy a 26X32 sub-image from srcBMP to destBMP at X,Y coordinates

I want it in original format (not stretched).

Help please :)
0
Comment
Question by:silvertrace
[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
3 Comments
 
LVL 37

Accepted Solution

by:
Geert Gruwez earned 125 total points
ID: 24826093

var
  DestBitmap, SrcBitmap: TBitmap;
  X, Y: Integer;

  BitBlt(DestBitmap.Handle, X, Y, X + SrcBitmap.Width-1, Y+SrcBitmap.Height-1, SrcBitmap.Handle, 0, 0,  SRCCOPY);

0
 

Author Comment

by:silvertrace
ID: 24826308
tried it....

same as before...no matter what I do I get a white screen on the canvas when I try to draw it.

=\
0
 

Author Closing Comment

by:silvertrace
ID: 31602211
Got it ..

Apparently BitBlt works with bmp.canvas.handle not bmp.handle

Thanks!
0

Featured Post

Technology Partners: 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

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…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
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…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

705 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