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
 Layer Operation Luminanz

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
klausdoege Posted - Jul 20 2012 : 03:24:17
Hello,
I would like to copy a part of a picture over another area.
In the example, I have copied the stones left into the layer.
The color of the background should be adopted.
With the operation of Luminanz, this perfectly goes with Photoshop.
Unfortunately, wrong color-hems originate with Imageen sees picture.
Don't the functions HSL2RGB and RGB2HSL possibly work correctly?

Example:
with Photoshop ->

66.48 KB
with Imageen ->

72.08 KB
Original:

76.38 KB

Klaus
www.klausdoege.de
5   L A T E S T    R E P L I E S    (Newest First)
fab Posted - Jul 26 2012 : 10:22:07
Many thanks for your tests!
klausdoege Posted - Jul 25 2012 : 14:21:40
Hello Fabrizio,
Congratulation, it is perfectly like in Photoshop sees example.


89.65 KB

Klaus
www.klausdoege.de
fab Posted - Jul 24 2012 : 03:59:02
Many thanks for your tests. It seems that using RGB->YCbCr conversion gives better results. Please try:
ielLuminosity:
      begin
        IERGB2YCbCr(src, Y_1, Cb_1, Cr_1);
        IERGB2YCbCr(dst, Y_2, Cb_2, Cr_2);
        IEYCbCr2RGB(dst, Y_1, Cb_2, Cr_2);
      end;

Of course you have to add following new variables on top:

var
  Y_1, Cb_1, Cr_1: integer;
  Y_2, Cb_2, Cr_2: integer;


In case this is ok, then it will be added as ielLuminosity2.

klausdoege Posted - Jul 22 2012 : 05:38:10
Hello,
thank you for the fast correction, it now better.
Only, it is unfortunately not yet quite correct.
Some color-pixels are still represented incorrectly.
Dark areas tend too red, lightens too blue.


73.52 KB

Klaus
www.klausdoege.de
fab Posted - Jul 20 2012 : 13:45:26
Hello,
actually there is a bug in hyieutils.pas (IEBlend procedure). Following code:
ielLuminosity:
      begin
        RGB2HSL(src, Ha, Sa, La);
        RGB2HSL(dst, Hb, Sb, Lb);
        HSL2RGB(dst, Ha, Sb, La);
      end;

Should be replaced with:
ielLuminosity:
      begin
        RGB2HSL(src, Ha, Sa, La);
        RGB2HSL(dst, Hb, Sb, Lb);
        HSL2RGB(dst, Hb, Sb, La);
      end;


Anyway my results are not yet satisfactory, maybe a new way is necessary.