Managing Alpha channels lazarus / 39-Graphics ---------------------------------------------------------------------- torbente · 2014-09-13 01:14 I need do some hark work with alpha channeled images. Are there any unit or package to make this easier? Basically, i need store a lot of small images (Imagelist maybe?) and then paste it in a TImage in all posibble ways and combinations. AFAIK, canvas draw do not work since it do not keep transparencys. Thanks a lot. ---------------------------------------------------------------------- torbente · 2014-09-13 13:02 Trying to paste many different images fron a imagelist to one Timage picture Image1: TImage; ImageList1: TImageList; image1.picture.bitmap := nil; Image1.Picture.Bitmap.TransparentMode := tmFixed; Image1.Picture.Bitmap.TransparentColor := clblack; Imagelist1 have 23 different images stored. I want be able to paste different images from it to the image1.picture at different positions. For example: imagelist1.draw(image1.picture.bitmap.canvas,20,20,0); imagelist1.draw(image1.picture.bitmap.canvas,10,10,1); But it do not works, the TImage remains totally transparent Please, any help is really apreciated. ---------------------------------------------------------------------- engkin · 2014-09-13 14:13 I don't think you can use Bitmap without first setting its size, something like: Code: [Select]Image1.Picture.Bitmap.SetSize(..., ...); ---------------------------------------------------------------------- torbente · 2014-09-13 16:07 if i set de size, the bitmap becomes totally black and im able to paste images from the imagelist, but still it is not transparent. what im missing? ---------------------------------------------------------------------- engkin · 2014-09-13 16:22 Maybe: Code: [Select]Image1.Picture.Bitmap.Transparent := True; ? Edit: Don't know, but maybe imagelist1.DrawingStyle should be dsTransparent? ---------------------------------------------------------------------- torbente · 2014-09-14 02:16 Ok, i solved this problem with a workaround, but i guess is a bug in the IDE. If i just assign an all transparent image to Timage in the IDE, with just one black pixel, everything works ok.