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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 IEN image extraction

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
aleatprog Posted - May 12 2022 : 14:00:23
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
1   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - May 12 2022 : 21:24:07
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