Extract PNG images from Delphi 2009 imagelist

TImageList Delphi 2009 has support for PNG images by adding them to the image editor. Is there a way to extract TPngImage from a TImagelist and save the alpha channel?

What I want to do is actually extract the images from one TImageList, make them a disabled version, and then add them to another TImageList. During this operation, of course, I would like to save the alpha channel of PNG images.

+3
source share
1 answer

I did something similar with Delphi 2006.

TImageList contains the protected GetImages method. It can be accessed using a "protected error"

type
  TGetImageImageList = class (TImageList) // Please use a better name!
  end;

You can draw an imagelist in a TGetImageImageList to get to GetImages.

begin
  TGetImageList(ImageList).GetImages(index, bitmap, mask);
end;

, - - , .

, :

function Add(Image, Mask: TBitmap): Integer;

, .

+1

Source: https://habr.com/ru/post/1697856/


All Articles