Solved

Delphi Copy Part of One Bitmap to Bitmap

Posted on 2009-07-10
3
2,095 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

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…
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…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

726 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