Solved

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

Posted on 2011-09-20
1
387 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:James Atkin
[X]
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
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

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…
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…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses
Course of the Month6 days, 13 hours left to enroll

623 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