public int Count(Bitmap image) { MyBitmap text = new MyBitmap(image); text.ConvertBitmapToBlackAndWhite(); text.gystogram = Gystogram.DoStringGystogram(text); Gystogram.SavePhotoWithGystogram(text.gystogram, text.bitmap, "F:\\Progr\\Csh\\wordCounter\\wordCounter\\bin\\Debug\\img\\Text_gystogram.jpg"); text.DivideIntoStrings(); int i = 0; foreach (TextString stroke in text.strings) { stroke.gystogram = Gystogram.DoWordGystogram(stroke.str); stroke.TrimString(); Gystogram.SavePhotoWithGystogram(stroke.gystogram, stroke.str.bitmap, "F:\\Progr\\Csh\\wordCounter\\wordCounter\\bin\\Debug\\img\\" + i + ".jpg"); stroke.DivideWords(); i++; } return(0); }