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
 TImageEnView and Proc.Fill() method

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
Flashcqxg Posted - Apr 16 2025 : 22:56:05
When using the Proc.Fill() method of TImageEnView to dynamically change colors with an Opacity value of 0.5, after changing the color several times, the original image is no longer visible. What is the reason for this, and is there a way to fix it?
8   L A T E S T    R E P L I E S    (Newest First)
Flashcqxg Posted - Apr 18 2025 : 22:37:43
Thanks.
xequte Posted - Apr 18 2025 : 20:44:34
Yes, that is what will happen.

Why not use something like:

ImageEnView1.Assign( fOriginalFile );
ImageEnView1.Proc.Fill(cxColorComboBox2.ColorValue, 0.5);
ImageEnView1.update.


Nigel
Xequte Software
www.imageen.com
Flashcqxg Posted - Apr 18 2025 : 02:35:45
My code:

ImageEnView1.Proc.Fill(cxColorComboBox2.ColorValue, 0.5);
ImageEnView1.update.


cxColorComboBox2 is a color select box.
First time is ok,but....you won't be able to see the content on the picture on the fifth try.
xequte Posted - Apr 18 2025 : 02:30:45
Hi

That is:
// Blend image with 50% blue
ImageEnView1.Proc.Fill( clBlue, 0.5 );


Nigel
Xequte Software
www.imageen.com
Flashcqxg Posted - Apr 18 2025 : 02:19:10
how to blend ?
xequte Posted - Apr 18 2025 : 02:17:00
Hi

Image formats do not support that. You can make an image 50% transparent, but then it won't be 50% blue (unless displayed over a blue background). The only way to make an image 50% blue is to perform a 50% blend with blue (and 0% transparency). If you then apply 50% red then you are going to get a result which is 25% image, 25% blue and 50% red, etc.

Your only option is to restore the original image and apply the new color changes to it.


Nigel
Xequte Software
www.imageen.com
Flashcqxg Posted - Apr 18 2025 : 01:53:55
I want to set a different color each time, and set its opacity value to 0.5
Proc.Fill() and AlphaFill() can not do this.
How to do?
xequte Posted - Apr 17 2025 : 23:45:18
Hi

Fill does not alter the alpha channel, only performs a color blend with the existing image content. So each time you fill at 0.5 opacity, you are making the image 50% solid color.

If you instead want to make the image 50% transparent use

https://www.imageen.com/help/TImageEnProc.AlphaFill.html

Nigel
Xequte Software
www.imageen.com