How can I get an Image from a Canvas at runtime....
Posted on 2011-09-20
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?