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
 Create transparent objBitmap

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
shackers Posted - Feb 13 2020 : 09:30:26
I'm trying to add a bitmap object to an imageEnView with transparency.

This is what I have so far:

bmp.PixelFormat:=pf24bit;
bmp.assign(bmpIconNote);
bmp.TransparentMode:=tmAuto;
bmp.saveToFile(filename);
ImageEnV.setObjBitmapFromFile(hObj, fileName);
ImageEnV.ObjWidth[hOBJ]:=48;
ImageEnV.ObjHeight[hOBJ]:=48;
I
However, the image is not transparent. What do I need to do?
2   L A T E S T    R E P L I E S    (Newest First)
shackers Posted - Feb 13 2020 : 14:43:58
Thanks Nigel.

I'll move to layers and it's easy enough for me to change the bitmap to an icon.
xequte Posted - Feb 13 2020 : 14:21:55
Hi

For a TBitmap to be transparent it must be 32bit. Even then I don't know that assigning an icon to it will copy the alpha information. You are probably better to work with TIEBitmap to generate a transparent image.

What is your source? If it is an icon file, you can just TIEBitmap.Read to load it with transparency.

Also, if you are starting on a new project, you should use TIELayers, not TImageEnVect objects, e.g.

ImageEnView1.LayersAdd( 'C:\myicon.ico' );

See:

https://www.imageen.com/help/TImageEnVect%20vs%20TIELayers.html

Nigel
Xequte Software
www.imageen.com