GdPicture.NET.14.API
GdPicture14 Namespace / GdPictureImaging Class / MICRDoMICR Method
GdPicture image identifier.
A member of the MICRFont enumeration.
The MICR context. A member of the MICRContext enumeration.
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.
The number of expected symbols to detect. Use 0 if this number is undefined.
Example





In This Topic
MICRDoMICR Method (GdPictureImaging)
In This Topic
Starts a MICR recognition process on a GdPicture image or on an area of a GdPicture image defined by SetROI() method.
Syntax
'Declaration
 
Public Function MICRDoMICR( _
   ByVal ImageID As Integer, _
   ByVal SymbolsFont As MICRFont, _
   ByVal context As MICRContext, _
   ByVal WhiteList As String, _
   ByVal ExpectedSymbols As Integer _
) As String
public string MICRDoMICR( 
   int ImageID,
   MICRFont SymbolsFont,
   MICRContext context,
   string WhiteList,
   int ExpectedSymbols
)
public function MICRDoMICR( 
    ImageID: Integer;
    SymbolsFont: MICRFont;
    context: MICRContext;
    WhiteList: String;
    ExpectedSymbols: Integer
): String; 
public function MICRDoMICR( 
   ImageID : int,
   SymbolsFont : MICRFont,
   context : MICRContext,
   WhiteList : String,
   ExpectedSymbols : int
) : String;
public: string* MICRDoMICR( 
   int ImageID,
   MICRFont SymbolsFont,
   MICRContext context,
   string* WhiteList,
   int ExpectedSymbols
) 
public:
String^ MICRDoMICR( 
   int ImageID,
   MICRFont SymbolsFont,
   MICRContext context,
   String^ WhiteList,
   int ExpectedSymbols
) 

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.
Remarks

This method is used in the "MICR" Demo.

Use the GetStat() method to determine if this method succeeded.

This method requires the MICR component to run.

Example
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);
}
See Also