Add Glyph with trasparency to TsAlphaImageList

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #49814
    Support
    Keymaster

      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.

      #49826
      Kujo
      Participant
        '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.

        #50060
        Support
        Keymaster

          This demo will be available with the next package release.

          And AlphaImageList will support Bitmap 32bpp there, I think.

          #50110
          Support
          Keymaster

            Hello

            Promised demo is available now : http://www.alphaskins.com/sfiles/demos/glyphsfromskin.zip

            Should be compiled with AC version 8.17

            #50142
            Kujo
            Participant
              'Support' wrote:

              Hello

              Promised demo is available now : http://www.alphaskins.com/sfiles/demos/glyphsfromskin.zip

              Should be compiled with AC version 8.17

              Hello,

              great support, this is exactly what I was looking for.

              Thank you very much.

            Viewing 5 posts - 1 through 5 (of 5 total)
            • You must be logged in to reply to this topic.