An unusual way to create an LCL application...
Apologies, I created a compact and minimal project to quickly identify the issue.
- Click on the '...' next to Image1.Picture and load the image to be displayed
My source image will either be a TFPMemoryImage that I generate myself or an external png file supplied after the program is already compiled and running. I am afraid that I cannot preload the image using the method that you suggested,
When you do it your way, maybe some initialization is missing, I don't know and don't want to investigate, because I do not want to motivate you to create LCL applications this way.
Don't worry, I am not creating LCL methods that way. It was just to demonstrate the issue, taken from a much, much larger program, in the minimal amount of lines.
Your lfm contains:
object Image1: TImage
Left = 0
Height = 600
Top = 0
Width = 600
Align = alClient
Picture.Data = {
175450...
}
Stretch = True
end
I see no additional initialisations there (but I am interested in how the Picture.Data is created)..
To convince yourself that the image really is transparent
I am convinced, thanks, your explanations are always clear, especially with your examples.
Maybe I should also mention that a transparent picture loaded into a TImage is always transparent to the form, but not to the desktop!
I think that I kinda understand the distinction.
Looks like the issue is copying the TFPMemoryImage to the TImage. Is there an alternative method to using TImage.Picture.Assign(TFPMemoryImage) which I can try?