Solved

Delphi Copy Part of One Bitmap to Bitmap

Posted on 2009-07-10
3
1,960 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 36

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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Windows Drag & Drop Location 2 85
Convert Jpg /PNG To GIF 5 102
Help on project with Soap 10 43
Working with hours 3 31
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…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

706 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now