Page 1 of 1

MaskedFilter?

PostPosted: Tue Mar 10, 2009 2:32 pm
by Wuzhyi
I found the Constructors as follows:
Code: Select all
public MaskedFilter(
   Bitmap mask,
   IFilter filter1)
public MaskedFilter(
   Bitmap mask,
   IFilter filter1,
   IFilter filter2)

what's should i input as filter1 and filter2 ? Can anybody give a simple example to show me how to use this Filter? Thanks!

Re: MaskedFilter?

PostPosted: Tue Mar 10, 2009 3:31 pm
by andrew.kirillov
Hello,

Wuzhyi wrote:what's should i input as filter1 and filter2 ?

You need to input image processing you want to apply to different regions of source image.

Actually I would not use MaskedFilter, since it will be removed from 2.0 version - depricated filter. Try TexturedFilter, which the same plus even more. And it has sample code with result images. But, if you still want to use masked filter, than you may use similar code to the one showed in sample of TexturedFilter.

In general, try reading docs – there are small samples. Also, try sample applications.

Re: MaskedFilter?

PostPosted: Wed Mar 11, 2009 1:35 am
by Wuzhyi
Thanks for your excellent work and quick response.

I do not need to process the difference part of the source image, I just want to "cut" the source image by mask image. So I deleted filter1 and filter2 and modified the code correspondingly, it's ok now.

I will learn more about the TextureFilter and AForge.Net framework by Docs and examples