How could I fade in/out a TImage?
I have a simple TForm named Form1; Image1 which is a TImage loaded with a PNGImage and a Button1 TButton to test things. It was implemented sucessfully a method to AlphaBlend Image1's picture. Code follows: procedure SetPNGOpacity(Image : TImage; Alpha: Byte); var Bmp: TBitmap; BlendFn: TBlendFunction; PNG: TPNGImage; begin Png := TPngImage.Create; Png.Assign(TPNGImage(Image.Picture.Graphic)); Bmp := TBitmap.Create; Bmp.Assign(Png); Image.Picture.Bitmap.PixelFormat := pf32bit; Image.Picture.Bitmap.AlphaFormat := afPremultiplied; Image.Picture.Bitmap.Canvas.Brush.Color := clBlack; Image.Picture