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
 IEView: Select, Change Colours

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
andyhill Posted - Aug 24 2022 : 17:31:20
I want to build a select in code and then change matching Colours from --> To, please advise - thanks

ImageEnView1.EndSelect();

// R:192 G:189 B:156
TIEPolylineLayer(ImageEnView1.CurrentLayer).IsMask:= True;
iMinRed:= 190;
iMaxRed:= 194;
iMinGreen:= 187;
iMaxGreen:= 191;
iMinBlue:= 154;
iMaxBlue:= 158;
iMinColor:= RGB(iMinRed, iMinGreen, iMinBlue);
iMaxColor:= RGB(iMaxRed, iMaxGreen, iMaxBlue);
iMinRGB:= TColor2TRGB(iMinColor);
iMaxRGB:= TColor2TRGB(iMaxColor);
//
ImageEnView1.SelectColors(TColor2TRGB(iMinColor), TColor2TRGB(iMaxColor));
//
ImageEnView1.SetSelectedAreaAlpha(0);
ImageEnView1.Update;



Andy
1   L A T E S T    R E P L I E S    (Newest First)
andyhill Posted - Aug 24 2022 : 17:44:45
All Good :)

// R:192 G:189 B:156
TIEPolylineLayer(ImageEnView1.CurrentLayer).IsMask:= True;
iMinRed:= 190;
iMaxRed:= 194;
iMinGreen:= 187;
iMaxGreen:= 191;
iMinBlue:= 154;
iMaxBlue:= 158;
iMinColor:= RGB(iMinRed, iMinGreen, iMinBlue);
iMaxColor:= RGB(iMaxRed, iMaxGreen, iMaxBlue);
iMinRGB:= TColor2TRGB(iMinColor);
iMaxRGB:= TColor2TRGB(iMaxColor);
ImageEnView1.Proc.CastColorRange(iMinColor, iMaxColor, clRed);

Andy