Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to get directly bitmap image from inkcanvas (in wpf)

I am doing an OCR project. I must to get an image from input in inkcanvas to process in the next step, i.e. translate this image to an two-dimension array.

I am confused about that how to get a bitmap image from inkcanvas to process. I have been searching for a solution from many sources but a lot of them just save the inkcanvas to file-stream.

please help me! thanks so much

like image 980
nguyen Avatar asked Nov 05 '22 17:11

nguyen


1 Answers

Check this blog post: http://www.centrolutions.com/Blog/post/2008/12/09/Convert-WPF-InkCanvas-to-Bitmap.aspx

That gets you a byte array for the bitmap, since you're doing OCR that should be enough.

like image 135
Filipe Miguel Avatar answered Nov 14 '22 09:11

Filipe Miguel