Transparency in TImage lazarus / 39-Graphics ---------------------------------------------------------------------- timppl · 2011-05-17 10:59 Hi I am porting an application from delphi to lazarus. For the splash screen, there is an image which is set as transparent on the form. In the form designer it correctly shows as transparent, but when compiled and run it shows with an olive background instead of transparent. I have tried to set the following properties in the FormCreate method   image.Picture.Bitmap.MaskHandle:=0;   Image.Picture.Bitmap.Transparent := True;   Image.Picture.Bitmap.TransparentColor := clOlive; but this does not work. Any suggestions? Thanks Tim PS I don't have delphi available; The app is proprietary closed source. Addition Looking into it further, the TImage itself is not used directly but is used as the bitmap for the brush in a TShape. So the question now is :  does the brush in a TShape support transparency?  I have looked in the documentation and can't find the answer. Tim ---------------------------------------------------------------------- Ñuño_Martínez · 2011-05-23 10:34 Are you sure it's "clOlive"?  Note that colour description must be exact! ---------------------------------------------------------------------- timppl · 2011-05-25 06:20 Quote from: Ñuño_Martínez on May 23, 2011, 12:34:56 pmAre you sure it's "clOlive"?  Note that colour description must be exact! I think the color was clOlive. I created an image and repainted the background ( the part I wanted to be transparent ) in Gimp, using the hex code from the graphics unit ( $008080 ). I assume this would give the correct value. Unfortunately I know very little about graphics programming so I have a steep learning curve. I also tried the method with a memory stream on the graphics page in the wiki, but that didn't work either. I should have said as well I am using the latest svn of lazarus on linux with gtk2 interface. Thanks Tim ---------------------------------------------------------------------- Ñuño_Martínez · 2011-05-25 16:02 Quote from: timppl on May 25, 2011, 08:20:22 amQuote from: Ñuño_Martínez on May 23, 2011, 12:34:56 pmAre you sure it's "clOlive"?  Note that colour description must be exact! I think the color was clOlive. I created an image and repainted the background ( the part I wanted to be transparent ) in Gimp, using the hex code from the graphics unit ( $008080 ). I assume this would give the correct value. That's the problem: you "assume", but computer needs exact values not assumptions. If you're using colour "$008080" then you should use that value as transparent. I never used colour values in LCL but I think you need to use TColor. BTW I recommend you to read this wiki page if you didn't yet. ---------------------------------------------------------------------- timppl · 2011-06-01 10:04 Thanks After further playing I realized I have actually asked the wrong question, so I will start a new thread for the right question. Regards Tim ---------------------------------------------------------------------- hlazo · 2016-07-01 10:24 Transparency in TImage works only with BMP images;  the last pixel (bottom, lefth) where the transparent color.