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 |
|
|