Circuids.Frame
1.0.0-preview.12
Prefix Reserved
dotnet add package Circuids.Frame --version 1.0.0-preview.12
NuGet\Install-Package Circuids.Frame -Version 1.0.0-preview.12
<PackageReference Include="Circuids.Frame" Version="1.0.0-preview.12" />
<PackageVersion Include="Circuids.Frame" Version="1.0.0-preview.12" />
<PackageReference Include="Circuids.Frame" />
paket add Circuids.Frame --version 1.0.0-preview.12
#r "nuget: Circuids.Frame, 1.0.0-preview.12"
#:package Circuids.Frame@1.0.0-preview.12
#addin nuget:?package=Circuids.Frame&version=1.0.0-preview.12&prerelease
#tool nuget:?package=Circuids.Frame&version=1.0.0-preview.12&prerelease
Circuids.Frame
Circuids.Frame is the platform-neutral core of Frame — a document scanning library for .NET. It contains the public contracts, configuration models, result records, events, and DI extension that every platform integration builds on.
Install this package directly only in shared libraries that compile against Frame's contracts without choosing a host runtime. Host apps should install a platform integration package (e.g. Circuids.Frame.Blazor) which references this package transitively.
Install
dotnet add package Circuids.Frame --version 1.0.0-preview.9
Targets net10.0.
What Frame Core Provides
| Capability | Contract |
|---|---|
| Camera access and lifecycle | ICameraProvider |
| Camera permission (never throws for expected failures) | ICameraProvider.RequestPermissionAsync |
| Live frame dimensions without byte transfer | ICameraProvider.GetFrameDimensionsAsync |
| Document detection (async) | IDocumentDetector.DetectAsync |
| Capture with perspective correction | ICapturePipeline |
| Image enhancement and encoding | IImageProcessor |
| PDF export | IPdfExporter |
Configuration
using Circuids.Frame;
builder.Services.AddFrame(options =>
{
options.AutoCapture.Enabled = true;
options.CaptureQuality.JpegQuality = 90;
options.Detection.Sensitivity = DetectionSensitivity.Balanced;
options.Detection.Performance = PerformanceMode.Balanced;
options.Camera.PreferredFacing = CameraFacing.Back;
options.Camera.PreferredResolution = CameraResolution.High;
});
All properties have sensible defaults. Zero configuration is a valid starting point.
Results
Capture and detection produce immutable records:
FrameScanResult result = await capturePipeline.CaptureAsync(frame, corners, options);
// result.ProcessedImage — perspective-corrected, cropped image (byte[])
// result.Format — Jpeg or Png
// result.Dimensions — output image dimensions
// result.Corners — detected corner points in source coordinates
// result.Detection — detection metadata (confidence, alignment, stability)
Events
Frame uses .NET's built-in event pattern with EventArgs-derived types:
CameraStateChangedEventArgs— camera lifecycle (opened, closed, permission denied, error)DetectionStateChangedEventArgs— per-frame detection resultCaptureCompletedEventArgs— completed scan result
Exceptions
Frame surfaces failures as typed exceptions. All Frame exceptions derive from FrameException:
try
{
// capture, detection, PDF export, etc.
}
catch (FrameException ex)
{
// Handles every Frame failure, including integration-specific ones.
}
FrameException— base type for all Core failures.BlazorFrameException(inCircuids.Frame.Blazor) — base type for Blazor integration failures; derives fromFrameException.
Argument-validation null guards throw ArgumentNullException (the .NET-idiomatic fail-fast pattern) and are not part of the Frame hierarchy.
Package Relationship
| Package | What it provides |
|---|---|
Circuids.Frame |
Platform-neutral core: contracts, models, configuration, results, events |
Circuids.Frame.Blazor |
Blazor integration: camera, JavaScript interop, UI components, browser implementation |
Circuids.Frame.Blazor depends on Circuids.Frame. Core never references an integration.
Learn More
- Repository: https://github.com/Circuids/Frame
- Samples: sample/Circuids.Frame.Blazor.Sample
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Circuids.Frame:
| Package | Downloads |
|---|---|
|
Circuids.Frame.Blazor
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0-preview.12 | 81 | 9/4/2026 |
| 1.0.0-preview.11 | 98 | 8/17/2026 |
| 1.0.0-preview.10 | 80 | 8/17/2026 |
| 1.0.0-preview.9 | 82 | 8/14/2026 |
| 1.0.0-preview.8 | 74 | 8/12/2026 |
| 1.0.0-preview.7 | 76 | 8/3/2026 |
| 1.0.0-preview.6 | 75 | 8/3/2026 |
| 1.0.0-preview.5 | 78 | 8/3/2026 |
| 1.0.0-preview.4 | 79 | 8/3/2026 |
| 1.0.0-preview.3 | 75 | 8/2/2026 |
| 1.0.0-preview.2 | 72 | 8/1/2026 |
| 1.0.0-preview.1 | 78 | 8/1/2026 |
1.0.0-preview.12
- No API changes; shipped with the Blazor integration fixes for default-selection capture, manual capture reliability, and detection-loop heap growth (see Circuids.Frame.Blazor release notes)
1.0.0-preview.11
- No API changes; shipped with the Blazor integration component sizing fixes (see Circuids.Frame.Blazor release notes)
1.0.0-preview.10
- No API changes; shipped with the Blazor integration component sizing parameters (see Circuids.Frame.Blazor release notes)
1.0.0-preview.9
- Added: DocumentImage — the capture input type: encoded image bytes (non-nullable Data) plus ImageDimensions.
- Breaking: ICapturePipeline now has a single CaptureAsync(DocumentImage, CornerPoints, FrameOptions, CancellationToken). The CameraFrame overload is removed — capture operates on encoded bytes, and live camera captures freeze the frame first.
- Added: ICameraProvider.GetFrameAsync(OutputFormat, int, CancellationToken) — freezes the current live frame as encoded bytes (JPEG/PNG).
- Added: CaptureReviewEventArgs — payload for the scanner's opt-in post-capture corner review (frozen image, detected corners, as-taken result).
1.0.0-preview.8
- Added: FrameException — the base type for all Frame failures. Consumers can now catch every Frame error in a single block, including integration-specific failures, instead of relying on built-in .NET exceptions.
1.0.0-preview.7
- No API changes; shipped with the Blazor integration fix for JS stream-reference byte transfers (see Circuids.Frame.Blazor release notes)
1.0.0-preview.6
- No API changes; shipped with the Blazor integration fixes for capture image encoding and the overlay viewfinder removal (see Circuids.Frame.Blazor release notes)
1.0.0-preview.5
- No API changes; shipped with the Blazor integration fix for OpenCV.js video-element input (see Circuids.Frame.Blazor release notes)
1.0.0-preview.4
- BREAKING: IDocumentDetector.Detect removed; replaced by ValueTask<DetectionResult> DetectAsync(CameraFrame, DetectionOptions, CancellationToken)
- BREAKING: CameraFrame.Data is now byte[]? (null when the platform keeps pixel data on-device, e.g. a live video element)
- BREAKING: ICameraProvider gains GetFrameDimensionsAsync (intrinsic live-frame dimensions, no byte transfer)
- Added: CameraPermission.NotSupported and CameraPermission.NotAvailable; RequestPermissionAsync never throws for expected camera failures (missing hardware, busy device, unsupported API, denial)
1.0.0-preview.3
- Fixed JS Interop Issues and etc..
1.0.0-preview.2
- Breaking: flattened all namespaces to Circuids.Frame (removed Configuration, Contracts, Results, Events, Export, Extensions sub-namespaces)
- All public types now in Circuids.Frame root namespace
1.0.0-preview.1
- Initial preview release
- Platform-neutral Core: configuration, results, events, contracts, and DI extension
- Camera access and lifecycle contract (ICameraProvider) with permission request support
- Document detection contract (IDocumentDetector) with high-level sensitivity and performance knobs
- Capture pipeline contract (ICapturePipeline) for perspective-corrected capture
- Image enhancement contract (IImageProcessor)
- PDF export contract (IPdfExporter) with programmatic byte generation and print dialog modes
- FrameOptions with sensible defaults for zero-configuration scanning
- Immutable result records: FrameScanResult, DetectionResult, CornerPoints, ImageDimensions
- CameraPermission enum: NotDetermined, Granted, Denied
- AddFrame DI extension (idempotent, order-independent)