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
 How to set transparency for an image?

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

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


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
wolf2009cn Posted - Jun 03 2023 : 21:34:15
I am trying to set the transparency of a PNG image to 50%, but the code above doesn't work. Could you please tell me how to write the correct code? thanks.

3   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Jun 06 2023 : 03:10:11

5.2.0 is quite an old version now, so I may not be recalling a difference in that version, but your code above should work.

You can also use:

ImageEnView1.Proc.AlphaFill( 128 );

Also ensure ImageEnView1.EnableAlphaChannel is set to true:

Xequte Software
wolf2009cn Posted - Jun 05 2023 : 10:34:13
I have found some methods called 'Update' in IEBitmap. I am using Delphi 7.0 with ImageEn 5.2, and I would like to set the transparency of an image. Could you please tell me how to write the code to achieve this?

xequte Posted - Jun 05 2023 : 02:10:57

That looks correct. Did you call ImageEnView1.Update() afterwards?

If you manipulated the bitmap directly you must call Update to show the changes in the TImageEnView.

Xequte Software