Solved

How can I get an Image from a Canvas at runtime....

Posted on 2011-09-20
1
384 Views
Last Modified: 2016-09-30
Hi all,

I have a Delphi application where I do the following:

1. Create a TImage at runtime.
2. Draw dynamically (using StretchDraw) onto the Canvas
3. Display this on a form

This works fine.

I now want to replace a specific colour on the TImage with another one.
I have aroutine that takes a TBitmap and performs the colour replacement, however it does not appear to work with what I am doing above!

The parameter I am calling the function with is "MyTImage.Picture.Bitmap"
I assume this is not the correct paramater to get the modified Canvas

Any ideas what I am doing wrong here?

Thanks,

James

0
Comment
Question by:jatkin
1 Comment
 
LVL 25

Accepted Solution

by:
epasquier earned 500 total points
ID: 36566198
ok, not Update as it will not invalidate the Image, but MyImage.Repaint; (= Invalidate + Update )
0

Featured Post

Independent Software Vendors: 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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

679 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