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

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

Posted on 2011-09-20
1
383 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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 exception 7 68
Delphi Form ownership 4 111
Unique identifier on a terminal server (rdp) 4 67
Dev express lookupcombo 3 34
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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…

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