Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

LMD 2024 TLMDSpeedButton certain images are not displayed

If I assign certain images to the glyph via Objebtinspector or from an LMDBitmapList, the image remains empty.
It works with the old 2019 version.

Comments

  • 2 Comments sorted by Votes Date Added
  • I have now found a solution myself:

    procedure TLMDGlyph.UpdateMaster;
    var
      done: Boolean;
      BMP: TBitmap;// BS 17.07.2025
    begin
      done := False;
      if Assigned(FOnGetBitmap) then
      begin
        FMaster.Assign(nil); // Clear for sure.
        FOnGetBitmap(Self, FMaster, done);
      end;
      if not done then
      begin
        if FGlyph.PixelFormat = pf32bit then // BS 17.07.2025
        begin
          BMP := TBitmap.Create(FGlyph.Width, FGlyph.Height);
          try
            Bmp.Canvas.Draw(0,0, FGlyph);
            FMaster.Assign(Bmp);
          finally
            Bmp.Free;
          end;
        end
        else
          FMaster.Assign(FGlyph);
        FMaster.AlphaFormat := afDefined;
      end;
    end;
  • Your bitmap is a 32bit bitmap with alpha-channel. Bitmap's alpha-channel contains only zeros, so it's fully transparent. As a result, it correctly shows as fully transparent (invisible).

    I've converted it to 24bit bitmap without alpha-channel for you using free PixelFormer image editor.
    bmp
    bmp
    a3e77c3b3dd38fc7cb66c664c6962c (1).bmp
    822B
Sign In or Register to comment.