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
 IEN image extraction
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

aleatprog

132 Posts

Posted - May 12 2022 :  14:00:23  Show Profile  Reply
Hi,

I load a PNG (with transparency) in a TImage + an image layer and save it as IEN file.

Afterwards, when I load the IEN file I'ld like also to load the included PNG in the TImage.

Which is the correct way to extract the PNG (TIEBitmap) in order to load it as TBitmap in the TImage.Picture.Bitmap, including the transparency?

Al

xequte

38610 Posts

Posted - May 12 2022 :  21:24:07  Show Profile  Reply
Hi Al

As long as the IEN_Compression is not a format like JPEG the compression will be maintained.

https://www.imageen.com/help/TIOParams.IEN_Compression.html

You can display a layer in a TImage as follows:

// Display a layer containing an image with alpha transparency in a TImage
iebmp := TIEBitmap.Create();
iebmp.Assign( ImageEnView1.Layers[3].Bitmap );
iebmp.SynchronizeRGBA( False, True ); // Convert 24bit Image + Alpha channel to 32bit RGBA
iebmp.CopyToTBitmap( Image1.Picture.Bitmap );
Image1.Picture.Bitmap.AlphaFormat := afDefined;
iebmp.Free;


Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: