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
 LayersMerge now working propely....

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
yogiyang Posted - Aug 01 2018 : 07:34:54
Hello,

I am using this code to add selection to mask layer. This code was wrking properly in version 7.5 but not working in 8.x.
if not ImageEnView1.Selected then
    exit;

  ImageEnView1.LayersCurrent := 1;
  idx := ImageEnView1.LayersCreateFromSelection;
  ImageEnView1.Deselect;

  ImageEnView1.Proc.HistAutoEqualize();
  ImageEnView1.Proc.Negative;
  ImageEnView1.Proc.ConvertToGray;
  ImageEnView1.CurrentLayer.Operation := TIERenderOperation(4);

  ImageEnView1.LayersMerge(1,idx, True);


Here is a test project that will show problem.

attach/yogiyang/2018817316_MaskProblem.zip
54.07 KB

To test in the sample:
  • Load an Image/Photo
  • Select an area
  • Click on button: Create Mask From Selection
  • Once the loaded image/photo is masked
  • Select something outside of the visible mask area
  • Click on button: Add Selection To Mask


TIA


Yogi Yang
2   L A T E S T    R E P L I E S    (Newest First)
yogiyang Posted - Aug 03 2018 : 06:20:47
Hello Nigel,

Thanks for the solution.

I have already worked out my own solution to this problem.

I posted it here to bring it to your notice.

But this was working in older version of IE so I posted here.

TIA


Yogi Yang
xequte Posted - Aug 03 2018 : 00:45:37
Hi Yogi

You are merging 8bit mask with a 24bit image, which is not possible. Please adjust it as follows:

  ImageEnView1.Layers[1].Bitmap.PixelFormat := ie24rgb;
  ImageEnView1.Layers[1].IsMask := False;
  ImageEnView1.LayersMerge(1, 2, True);
  ImageEnView1.Layers[1].IsMask := True;
  ImageEnView1.Layers[1].Visible := False;


Nigel
Xequte Software
www.imageen.com