public int ReadThisImage(int [,] img, int diagEnabled, ref LPR_PROCESS_OPTIONS processOptions, ref int error) { int n = 0; int width = img.GetLength(0); int height = img.GetLength(1); unsafe { fixed(int *ptr = img) fixed(LPR_PROCESS_OPTIONS * pOptsPtr = &processOptions) { n = LPROCR_lib_ReadThisImage(ptr, width, height, diagEnabled, pOptsPtr, ref error); } } return(n); }
public void LoadImage(int[,] img, bool diagEnabled, ref LPR_PROCESS_OPTIONS processOptions, ref int error) { int width = img.GetLength(0); int height = img.GetLength(1); int diag = (diagEnabled) ? 1 : 0; unsafe { fixed(int *ptr = img) fixed(LPR_PROCESS_OPTIONS * pOptsPtr = &processOptions) { LPROCR_lib_LoadImage(ptr, width, height, diag, pOptsPtr, ref error); } } return; }
public int ReadThisImage( int [,] img, int diagEnabled, ref LPR_PROCESS_OPTIONS processOptions, ref int error ) { int n=0; int width = img.GetLength(0); int height = img.GetLength(1); unsafe { fixed (int* ptr = img) fixed (LPR_PROCESS_OPTIONS * pOptsPtr = & processOptions) { n = LPROCR_lib_ReadThisImage(ptr, width, height, diagEnabled, pOptsPtr, ref error); } } return(n); }
static unsafe extern int LPROCR_lib_ReadThisImage(int* img, int width, int height, int diagEnabled, LPR_PROCESS_OPTIONS * processOptions, ref int error);
public void LoadImage(int[,] img, bool diagEnabled, ref LPR_PROCESS_OPTIONS processOptions, ref int error) { int width = img.GetLength(0); int height = img.GetLength(1); int diag = (diagEnabled) ? 1 : 0; unsafe { fixed (int* ptr = img) fixed (LPR_PROCESS_OPTIONS* pOptsPtr = &processOptions) { LPROCR_lib_LoadImage(ptr, width, height, diag, pOptsPtr, ref error); } } return; }