ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Mask layer merge problem
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

apollo800

China
2 Posts

Posted - May 17 2013 :  05:05:50  Show Profile  Reply
//-----------------------------------------------------------------
TImageEnView * tempIE=new TImageEnView(this);
tempIE->IO->LoadFromFileAuto("NULL.png");
tempIE->LayersAdd();
tempIE->IO->LoadFromFileAuto("back.jpg");
tempIE->LayersAdd();
tempIE->IO->LoadFromFileAuto("mask.jpg");
tempIE->Layers[2]->IsMask =true;
IELayersMerge(tempIE->Layers[0], tempIE->Layers[1],tempIE->Layers[2]
,ImageEnView1->Layers[1]->Bitmap ,rfNone,clBlack,false);
delete tempIE;
//-------------------------------------------------------------------

NULL.png,back.jpg,mask.jpg have some size.
ImageEnView1->Layers[1]#65292;The location and size of the mask is applied incorrect#65281;
How merge with a mask layer to a layer?and The target layer have to keep Alpha?

fab

1310 Posts

Posted - May 20 2013 :  02:17:05  Show Profile  Reply
Please could you send a test project (with images) that shows the problem?
Go to Top of Page

apollo800

China
2 Posts

Posted - May 24 2013 :  04:40:05  Show Profile  Reply
I mainly want to mask layer is applied to the current layer, and the alpha channel is preserved


74.92 KB

Download Attachment: 201352443925_MeryMaskLayer.zip
Go to Top of Page

fab

1310 Posts

Posted - May 28 2013 :  22:51:09  Show Profile  Reply
You should replace:

IELayersMerge(tmpIE->Layers[0], tmpIE->Layers[1],tmpIE->Layers[2], ImageEnView1->IEBitmap , rfNone,clBlack,false);

...with...

tmpIE->LayersMergeAll();
ImageEnView1->Assign(tmpIE);
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: