During the image loading, .NET specific problems can occur.
The image is encapsulated in System.Drawing.Bitmap object in
application memory. The bitmap data has to be transferred in byte[] array to
kRecLoadImgM.
BitmapData.Stride is a signed number:
Positive value means TOP_DOWN, and negative value means BOTTOM_UP. The sign
of Stride is mapped into lineord of
kRecSetImgFormat.
BytesPerLine is the absolute value of
Stride.
.NET and OmniPage SDK interprets differently the RGB order:
Bitmap.PixelFormat Rgb means BGR for
kRecLoadImgM
Bitmap.PixelFormat Argb means BGRA for
kRecLoadImgM
The following code sample can be used to load a bitmap image from the memory:
//Image is received in argument (Bitmap bmp)
Rectangle rect = new Rectangle(0, 0, bmp.Width, bmp.Height);
BitmapData bmpData = bmp.LockBits(rect, ImageLockMode.ReadOnly, bmp.PixelFormat);
IMG_LINEORDER imgLineOrder = bmpData.Stride < 0 ? IMG_LINEORDER.BOTTOM_UP : IMG_LINEORDER.TOP_DOWN;
IMG_INFO ImgInfo = new IMG_INFO();
ImgInfo.Size.cx = bmp.Width;
ImgInfo.Size.cy = bmp.Height;
ImgInfo.DPI.cx = (Int32)bmp.HorizontalResolution;
ImgInfo.DPI.cy = (Int32)bmp.VerticalResolution;
ImgInfo.BytesPerLine = (uint)Math.Abs(bmpData.Stride);
byte[] buf = new byte[Math.Abs(bmpData.Stride) * bmp.Height];
Marshal.Copy(bmpData.Scan0, buf, 0, buf.Length);
bmp.UnlockBits(bmpData);
switch (bmp.PixelFormat){
case PixelFormat.Format24bppRgb:
ImgInfo.BitsPerPixel = 24;
RecAPI.kRecSetImgFormat(0, imgLineOrder, IMG_PADDING.PAD_DWORDBOUNDARY, IMG_RGBORDER.COLOR_BGR);
break;
}
RecAPI.kRecLoadImgM(0, buf, ImgInfo, out hPage);
Search results
Search tips
The search returns topics that contain terms you enter. If you type more than one term, an OR is assumed, which returns topics where any of the terms are found. Enclose your search terms in quotes for exact-phrase matching.
The search also uses fuzzy matching to account for partial words (such as install and installs). The results appear in order of relevance, based on how many search terms occur per topic. Exact matches are highlighted.
To refine the search, you can use the following operators:
Type + in front of words that must be included in the search or - in front of words to exclude. (Example: user +shortcut –group finds shortcut and user shortcut, but not group or user group.)
Use * as a wildcard for missing characters. The wildcard can be used anywhere in a search term. (Example: inst* finds installation and instructions.)
Type title: at the beginning of the search phrase to look only for topic titles. (Example: title:configuration finds the topic titled “Changing the software configuration.”)
For multi-term searches, you can specify a priority for terms in your search. Follow the term with ^ and a positive number that indicates the weight given that term. A higher number indicates more weight. (Example: shortcut^10 group gives shortcut 10 times the weight as group.)
To use fuzzy searching to account for misspellings, follow the term with ~ and a positive number for the number of corrections to be made. (Example: port~1 matches fort, post, or potr, and other instances where one correction leads to a match.)
Note that operators cannot be used as search terms: + - * : ~ ^ ' "