Light.SDK
1.0.7
dotnet add package Light.SDK --version 1.0.7
NuGet\Install-Package Light.SDK -Version 1.0.7
<PackageReference Include="Light.SDK" Version="1.0.7" />
<PackageVersion Include="Light.SDK" Version="1.0.7" />
<PackageReference Include="Light.SDK" />
paket add Light.SDK --version 1.0.7
#r "nuget: Light.SDK, 1.0.7"
#:package Light.SDK@1.0.7
#addin nuget:?package=Light.SDK&version=1.0.7
#tool nuget:?package=Light.SDK&version=1.0.7
Light SDK
Light SDK is a professional .NET SDK for ID photo generation and image processing. It is designed for production apps that need reliable background matting, face-aware framing, beauty adjustments, watermarking, printable layouts, and flexible export options.
Why Light SDK
- Production-ready API focused on ID photo workflows.
- Lightweight NuGet package with external model delivery.
- Clean integration for desktop, server, and cloud applications.
- Strong support for passport, visa, and custom document photo standards.
Install
dotnet add package Light.SDK
Requirements
- .NET 10 runtime.
- Model files downloaded from the official release page.
- A valid local path where models are extracted.
Models Download (Required)
The NuGet package is intentionally lightweight and does not include model binaries.
Download models from the official release assets:
- https://github.com/LightPxl/Light-SDK/releases/tag/v0.0.0 After download, extract models into this folder layout:
models/
detector models/
Light_faceDetect.lsdkm
matting models/
Light.Huma.lsdkm
Light.lite.lsdkm
Light.M01.lsdkm
Light.M02.lsdkm
Light.M03.lsdkm
Light.M04.lsdkm
Light.M05.lsdkm
Light.M06.lsdkm
Light.M07.lsdkm
Light.M08.lsdkm
Light.M09.lsdkm
Light.M10.lsdkm
Light.M11.lsdkm
Light.M12.lsdkm
Light.M13.lsdkm
Light.M14.lsdkm
Light.M15.lsdkm
Light.M16.lsdkm
Light.M17.lsdkm
Light.M18.lsdkm
Light.X01.lsdkm
Light.X02.lsdkm
Light.X03.lsdkm
Light.X04.lsdkm
Light.X05.lsdkm
Light.X06.lsdkm
Light.X07.lsdkm
Light.X08.lsdkm
Light.X09.lsdkm
Light.X10.lsdkm
Light.X11.lsdkm
Quick Start Guide
1. Install the package
dotnet add package Light.SDK
Package on NuGet.org: https://www.nuget.org/packages/Light.SDK
2. Download and extract models
- Open the official release page: https://github.com/LightPxl/Light-SDK/releases
- Download the model archive.
- Extract it to a local folder, for example:
D:\lightpxl\models
3. Create your first ID photo
using HivisionIDPhotos.Core.Models.Sdk;
using Light.SDK;
var options = new IdCreatorOptions
{
ModelsRootPath = @"D:\lightpxl\models"
};
using var creator = new IdCreator(options);
var result = creator.CreateFromFile("input.jpg", cfg => cfg
.WithSizePreset(IdPhotoSizePreset.AmericanVisa)
.WithBackgroundColor("FFFFFF")
.WithModels(FaceDetectionModelPreset.LightFaceDetect, MattingModelPreset.LightLite)
.WithFaceLayout(headRatio: 0.2, topDistance: 0.12, faceAlign: true)
.WithStandardExport(OutputImageFormat.Jpeg, dpi: 300));
File.WriteAllBytes("output.jpg", result.StandardImageBytes);
Notes
- Keep SDK version and downloaded model bundle version aligned.
- If model paths are wrong, processing will fail at runtime.
- For best quality, use high-resolution input images with a clear front-facing portrait.
| 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
- FaceONNX (>= 4.1.1.3)
- Microsoft.ML.OnnxRuntime (>= 1.24.4)
- OpenCvSharp4 (>= 4.13.0.20260330)
- OpenCvSharp4.runtime.win (>= 4.13.0.20260302)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Unrestricted production SDK. Models are external and provided by host applications via IdCreatorOptions model paths.