Skip to content

OcrBitmap class

View as Markdown

Namespace: PdfNetStack.Ocr
Assembly: PdfNetStack.Ocr.dll
Package: PdfNetStack.Ocr

An 8 bit gray image: rows top to bottom, Width bytes each, 0 black.

public sealed class OcrBitmap

Inheritance

object ← OcrBitmap

Wraps gray pixels.

public OcrBitmap(int width, int height, byte[] pixels)

width int

Width in pixels.

height int

Height in pixels.

pixels byte[]

Width times height bytes.

ArgumentException

The pixel count does not match the size.

Height in pixels.

public int Height { get; }

int

The pixels, one byte each.

public byte[] Pixels { get; }

byte[]

Width in pixels.

public int Width { get; }

int

Gray from a decoded PDF image: RGB is weighed by luma (ITU-R BT.601).

public static OcrBitmap FromPdfBitmap(PdfBitmap bitmap)

bitmap PdfBitmap

The decoded image.

OcrBitmap