Fastest way to convert image to Black and white image
The text of this thread is not in this database — only its details are. Read it on the old site: Fastest way to convert image to Black and white image
The text of this thread is not in this database — only its details are. Read it on the old site: Fastest way to convert image to Black and white image
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Faris ShahinPosted Oct 6, 2016, 9:56 AM
You can specify a region and then apply image processing operations on that region without affecting the remaining pixel data of the image. You can find more about specifying regions here:
https://www.leadtools.com/help/leadtools/v19/dh/to/leadtools.topics~leadtools.topics.creatingaregion.html
About converting the pixel data to black and white, you can use LEADTOOLS functions like IntensityDetectCommand Class.
void _viewer_MouseMove(object sender, MouseEventArgs e)
{
if (e.Button == System.Windows.Forms.MouseButtons.Left)
{
_viewer.Image.AddEllipseToRegion(null, new LeadRect(e.X - 30, e.Y - 30, 60, 60), RasterRegionCombineMode.Set);
_intensityDetectCommand.Run(_viewer.Image);
_viewer.Image.MakeRegionEmpty();
}
_viewer.Refresh();
var g = _viewer.CreateGraphics();
g.DrawEllipse(new Pen(Color.Green, 3), new Rectangle(e.X - 30, e.Y - 30, 60, 60));
g.Dispose();
Piyush VaishnavswamiPosted Oct 17, 2016, 6:57 AM
Piyush VaishnavswamiPosted Sep 28, 2016, 5:45 AM
Delpin Susai RajPosted Sep 27, 2016, 11:59 AM
Midhun TpPosted Sep 27, 2016, 11:58 AM
Please refer below blogs-
http://www.c-sharpcorner.com/blogs/convert-a-color-image-into-black-and-white-image1
http://notes.ericwillis.com/2009/11/make-an-image-black-and-white-in-csharp/