A
A
Andrew2015-08-15 11:32:26
WPF
Andrew, 2015-08-15 11:32:26

How to make an image black and white in Aforge.NET?

Unable to apply filter to image.
I try like this:

private void Button_Click_3(object sender, RoutedEventArgs e)
            {
                // create grayscale filter (BT709)
                Grayscale filter = new Grayscale(0.2125, 0.7154, 0.0721);
                // apply the filter
                Bitmap grayImage = filter.Apply(image2);

            }

The image has already been inserted into image2.
I'm getting an error , can you tell me
c7b0ff37d4f64ec7b6d254598454c328.png
how to fix it?
www.aforgenet.com/framework/docs/html/d7196dc6-817...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Albert Khoroshun, 2015-08-20
@khoramus

An object of the Bitmap class must be passed to the apply method.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question