 | OcrPixFromRaw Method |
Creates new instance of OcrPix class.
Namespace: Patagames.OcrAssembly: Patagames.Ocr (in Patagames.Ocr.dll) Version: 4.6.411
Syntaxpublic static OcrPix FromRaw(
IntPtr scan0,
int bpp,
int stride,
int width,
int height,
int spp,
RGBA_Quad[] palette,
int xRes,
int yRes
)
Public Shared Function FromRaw (
scan0 As IntPtr,
bpp As Integer,
stride As Integer,
width As Integer,
height As Integer,
spp As Integer,
palette As RGBA_Quad(),
xRes As Integer,
yRes As Integer
) As OcrPix
public:
static OcrPix^ FromRaw(
IntPtr scan0,
int bpp,
int stride,
int width,
int height,
int spp,
array<RGBA_Quad^>^ palette,
int xRes,
int yRes
)
static member FromRaw :
scan0 : IntPtr *
bpp : int *
stride : int *
width : int *
height : int *
spp : int *
palette : RGBA_Quad[] *
xRes : int *
yRes : int -> OcrPix public static OcrPix FromRaw(
IntPtr scan0,
int bpp,
int stride,
int width,
int height,
int spp,
RGBA_Quad[] palette,
int xRes,
int yRes
)
Patagames.Ocr.OcrPix.FromRaw = function(scan0, bpp, stride, width, height, spp, palette, xRes, yRes);
Parameters
- scan0 IntPtr
- The address of the first pixel data in the bitmap. This can also be thought of as the first scan line in the bitmap.
- bpp Int32
- Bits per Pixel
- stride Int32
- The stride width in bytes (also called scan width) of the image
- width Int32
- Width of the image.
- height Int32
- Height of the image.
- spp Int32
- Samples per pixel.
- palette RGBA_Quad
- Palette for indexed images
- xRes Int32
- The horizontal resolution, in pixels per inch, of this OcrPix.
- yRes Int32
- The vertical resolution, in pixels per inch, of this OcrPix.
Return Value
OcrPixThe new instance of OcrPix class.
Exceptions
Remarks
Greyscale of 8 and color of 24 or 32 bits per pixel may be given.
Palette color images will not work properly and must be converted to
24 bit.
Binary images of 1 bit per pixel may also be given but they must be
byte packed with the MSB of the first byte being the first pixel, and a
1 represents WHITE. For binary images set bytes_per_pixel= 0.
The data should be in bgr format.
See Also