ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 How Do I make a Transparent PNG File From a Bitmap
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

john_siggy@yahoo.com

USA
158 Posts

Posted - Jul 22 2019 :  11:51:10  Show Profile  Reply
Attached you will see an image with two smaller images on top. One of the smaller images (the checkmark) is a transparent CUR file. I am unable to make the other image transparent.

How do I save a bitmap to a transparent PNG or CUR file ???


Regards,

John

john_siggy@yahoo.com

USA
158 Posts

Posted - Jul 22 2019 :  11:53:58  Show Profile  Reply
Here is the image:

Go to Top of Page

xequte

38613 Posts

Posted - Jul 22 2019 :  21:59:03  Show Profile  Reply
Hi John

You can do it as follows:

procedure TForm1.Button2Click(Sender: TObject);
var
  transColor: TRGB;
begin
  ImageEnView1.IO.LoadFromFile('D:\makestrans.bmp');

  // Bottom left pixel represents the transparent color
  transColor := ImageEnView1.IEBitmap.Pixels[0, Height-1];

  ImageEnView1.Proc.SetTransparentColors( transColor, transColor, 0 );

  ImageEnView1.IO.SaveToFile('D:\NowTransparent.png');
end;


Nigel
Xequte Software
www.imageen.com
Go to Top of Page

john_siggy@yahoo.com

USA
158 Posts

Posted - Jul 23 2019 :  10:51:20  Show Profile  Reply
Thnks alot Nigel...
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: