Namespace Zaya.Primitives
Classes
Languages
Provides a static list of common languages as EnumOption values. OCR, translation, and other engines reference All in their Options to present a language dropdown in the host UI. Each option's Value is a BCP-47 tag (e.g. "ru", "zh-Hans").
LocalizedException
Base class for exceptions that carry a localizable user-facing message. Subclasses override GetLocalizedMessage(CultureInfo) to resolve translations. The constructor receives only a localization key; the default culture resource file is the source of strings.
LocalizedString
Represents a string that can be localized. Supports two modes:
- Localized via a resolver function (typically a .resx
ResourceManager). - Invariant — created via Invariant(string) and never translated.
All source strings live in resource files; no English defaults are embedded in code.
Structs
BoundingBox
Oriented quadrilateral in image pixel space (Y down). Corner order matches OneOCR: P1→P2 along the top (reading direction), P3→P4 along the bottom back.
PixelFormat
Represents a pixel format with conversion methods.
Interfaces
IRawImage
Represents a raw in-memory image with direct pixel data access. Contrast with encoded images (PNG, JPEG) — this is the decoded pixel buffer with known dimensions, stride, and format.