Solved

Delphi Copy Part of One Bitmap to Bitmap

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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Suggested Solutions

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

777 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