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
 Mask with selection

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
ali_reza_nazari Posted - Mar 13 2019 : 09:31:41
Hi.
i want to select a region and then when i click on a button,
selected are show and not selected area not show and be black

i first run this code

ImageEnView1.IO.LoadFromFileJpeg('C:\1.jpg');


Then select a region on ImageEnView
and finally click on button a run this code


 if not ImageEnView1.Selected then exit;
 if ImageEnView1.LayersCount <> 2 then ImageEnView1.LayersInsert( 
  ImageEnView1.LayersCurrent + 1, ielkImage );

  ImageEnView1.InvertSelection;
  ImageEnView1.proc.Fill(Clblack);
  ImageEnView1.InvertSelection;
  ImageEnView1.proc.Fill(Clwhite);
  TIEImageLayer( ImageEnView1.CurrentLayer ).Bitmap.PixelFormat := ie8g;
  ImageEnView1.CurrentLayer.IsMask := True;
  ImageEnView1.Layers[1].IsMask := true;



Selected are is white and outside is black
but only show an black/white image and
masked image not showed

thanks


Dr.
IA Computer
1   L A T E S T    R E P L I E S    (Newest First)
ali_reza_nazari Posted - Mar 13 2019 : 10:12:30
Hi again

i add this code to second code
it work fine

ImageEnView1.CurrentLayer.Visible := False;



Dr.
IA Computer