ImageEn, unit iexBitmaps

TIEBitmap.AddToImageList

TIEBitmap.AddToImageList


Declaration

procedure AddToImageList(Dest: TCustomImageList; Alpha32Bit: Boolean = true);


Description

Adds the image with its alpha channel to a TImageList.
If Alpha32Bit is True, the image is added with a 32bit alpha channel (range of alpha values). If false, it is added with a single alpha value.

Note:
 This process will modify the PixelFormat to ie32RGB
 If Alpha32Bit is true, you should set the ColorDepth of your ImageList to cd32bit (Not recommended for applications without theming)


Example

// Add 32bit PNG images (with alpha channels) to a TImageList
ImageList.Clear;
ImageList.Height := 24;
ImageList.Width  := 24;
ImageList.ColorDepth := cd32bit;

iebmp := TIEBitmap.Create;

iebmp.Read('D:\TransparentImage1.png');
iebmp.AddToImageList( ImageList );

iebmp.Read('D:\TransparentImage2.png');
iebmp.AddToImageList( ImageList );

iebmp.Read('D:\TransparentImage3.png');
iebmp.AddToImageList( ImageList );

iebmp.Read('D:\TransparentImage4.png');
iebmp.AddToImageList( ImageList );

iebmp.free;


See Also

 SynchronizeRGBA
 BMP_HandleTransparency
 CopyToTBitmap