Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1096221
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T00:15:04+00:00 2026-05-17T00:15:04+00:00

With code procedure TForm2.Button1Click(Sender: TObject); var oMeta: TMetaFile; oBmp: TBitmap; begin Image1.Transparent := True;

  • 0

With code


procedure TForm2.Button1Click(Sender: TObject);
var
  oMeta: TMetaFile;
  oBmp: TBitmap;
begin
  Image1.Transparent := True;
  Image1.Picture.LoadFromFile('D:\data\WMF.wmf');

  oBmp := TBitmap.Create;
  try
    oMeta := TMetaFile(Image1.Picture.Graphic);
    oBmp.SetSize(oMeta.Width, oMeta.Height);
    oBmp.Canvas.Draw(0, 0, oMeta);
    oBmp.SaveToFile('D:\data\WMF.bmp');
  finally
    oBmp.Free;
  end;
end;

I Show wmf image and create bmp file. Created bmp image I show with code


procedure TForm2.Button2Click(Sender: TObject);
begin
  Image1.Transparent := True;
  Image1.Picture.LoadFromFile('D:\data\WMF.bmp');
end;

but image is shown without transparency. Whay ? How can I show this bmp image with transparency ?

TIA and best regards
Branko

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T00:15:04+00:00Added an answer on May 17, 2026 at 12:15 am

    First of all, you should know that transparent BMP’s are very uncommon. Hence, many (most) bitmap viewers, encoders, and decoders do not support transparent bitmaps. However, there is some hope. First of all, many bitmaps are 32-bit, even though the pixels most often are stored in the format $00BBGGRR. The first byte of each “pixel” is hence unused, and one could of course use this as the opacity value: $AABBGGRR. But this is not only my personal ideas. Most bitmaps use the version 3 bitmap header, but version 4 (and version 5) actually supports transparency data. You simply specify the red, green, blue, and alpha masks (e.g. $000000FF, $0000FF00, $00FF0000, and $FF000000, respectively) and then you can store red, green, blue, and alpha intensities per pixel.

    Still, as I said, most bitmap viewers, encoders, and decoders doesn’t support transparent bitmaps. I think that the VCL encoders, decoders, and viewer (TImage) don’t.

    I would consider using PNG instead of BMP. The PNG bitmap image format supports transparency in a lot of different ways.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

this code works fine: procedure TForm2.Timer1Timer(Sender: TObject); var Text: string; begin SetLength (Text,555); GetWindowText
code sample procedure TForm1.Button1Click(Sender: TObject); var r: Trect; s: String; begin R := Rect(0,0,
Take the following code as a sample: procedure TForm1.Button1Click(Sender: TObject); var Obj: TSomeObject; begin
I have some simple code: procedure TForm1.Button1Click(Sender:TObject); var x: RawByteString; begin x := UTF8Encode('testing
The code: var WinHttpReq: OleVariant; procedure TForm1.Button1Click(Sender: TObject); begin WinHttpReq := CreateOleObject('WinHttp.WinHttpRequest.5.1'); WinHttpReq.Open('GET', 'http://stackoverflow.com',
hi there here it is my code: procedure TForm4.Button1Click(Sender: TObject); var png: TPNGImage; data:
How will the Delphi compiler compiles the following code ; uses a_big_unit; procedure TForm1.Button1Click(Sender:
I have a Delphi program which contains the following code: procedure TForm1.Shape1MouseDown(Sender: TObject; Button:
I am studying a MIPS code that uses procedure but I can not understand
I am passing a datatable from Code to stored procedure in this way. DataTable

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.