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
Solved

Delphi Copy Part of One Bitmap to Bitmap

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi cmd execution 6 67
Send message from delphi to whatsapp, is it possible? 3 1,663
How to debug For loops? 3 56
Firemonkey DbLookupComboBox equivalent ? 2 55
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…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

856 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