Problem:
I have a TImage on a Delphi VCL form and want to assign a TGraphic.
The picture has transparent pixels.
When displaying the picture inside the TImage I want to display all transparent pixels in the color clBlue.
Unfortunately TImage does not have a property for a background color.
What I have already tried:
Fill the TImage with blue and afterwards to assign the picture:
MyImage.Canvas.Brush.Style := bsSolid;
MyImage.Canvas.Brush.Color := clBlue;
MyImage.Canvas.FillRect(Rect(0, 0, MyImage.Width, MyImage.Height));
MyImage.Picture.Assign(MyGraphic);
Set the TransparentColor of the bitmap:
MyImage.Picture.Bitmap.TransparentColor := clBlue;
MyImage.Picture.Assign(MyGraphic);
Nothing worked :-(