'Support' wrote:
Hello!
I can make a demo how to extract such image to 32bit bmp, but such bitmap can't be added into TsAlphaImageList because only Ico and Png are support there.
Maybe support of 32bit bmp will be added to this component also later.
Yes, if is possible to have a demo thanks a lot: I need to know how to extract a Glyph (PNG and bitmap formats) with the transparent background.
You wrote: …but such bitmap can't be added into TsAlphaImageList because only Ico and Png are support there
But with the following code I'm able to add a bitmap to the TsAlphaImageList; what am I doing wrong?
Code:
var
GlypBmp : TBitmap;
GlyphSize : TSize;
begin
GlyphSize.cx := WidthOfImage(DefaultManager.ma[AIndex]);
GlyphSize.cy := HeightOfImage(DefaultManager.ma[AIndex]);
AlphaImageList1.Width := GlyphSize.cx;
AlphaImageList1.Height := GlyphSize.cy;
GlyphBmp := CreateBmp32(GlyphSize.cx, GlyphSize.cy);
DrawSkinGlyph(GlyphBmp, Point(0, 0), 0, 1, DefaultManager.ma[AIndex], MakeCacheInfo(GlyphBmp));
AlphaImageList1.Add(GlyphBmp, nil);
FreeAndNil(GlyphBmp);
end;
I'm sorry if I make stupid questions, but my job is focused on low level communications between hardware devices, so is not easy for me to understand and to manipulate the images.