MICRDoMICR Method (GdPictureImaging)
Starts a MICR recognition process on a GdPicture image or on an area of a GdPicture image defined by SetROI() method.
public function MICRDoMICR(
: Integer;
: MICRFont;
: MICRContext;
: String;
: Integer
): String;
'Declaration
Public Function MICRDoMICR( _
ByVal As Integer, _
ByVal As MICRFont, _
ByVal As MICRContext, _
ByVal As String, _
ByVal As Integer _
) As String
Parameters
- ImageID
- GdPicture image identifier.
- SymbolsFont
- A member of the MICRFont enumeration.
- context
- The MICR context. A member of the MICRContext enumeration.
- WhiteList
- This parameter can be used to specify your own white list of chars.
Can be any members of "0123456789/<#>^ABCDEFGHIJKLMNOPQRSTUVWXYZ" for CMC7 symbols detection or "0123456789ABCD" for E-13B.
Use empty string to recognize all characters.
- ExpectedSymbols
- The number of expected symbols to detect. Use 0 if this number is undefined.
Return Value
The string representation of the detected symbols.
Reading an MICR line within a jpeg image.
using (GdPictureImaging gdpictureImaging = new GdPictureImaging())
{
string whiteList = "0123456789/<#>^ABCDEFGHIJKLMNOPQRSTUVWXYZ";
int imageID = gdpictureImaging.CreateGdPictureImageFromFile("image.jpg");
// Read the CMC7 line contained in the image.
string text = gdpictureImaging.MICRDoMICR(imageID, MICRFont.MICRFontCMC7, MICRContext.MICRContextLineFinding, whiteList, whiteList.Length);
gdpictureImaging.MICRClear();
gdpictureImaging.ReleaseGdPictureImage(imageID);
MessageBox.Show(text, "MICR", MessageBoxButtons.OK, MessageBoxIcon.Information);
}