A high-performance, cross-platform desktop application for batch-generating AVIF images with dynamic text overlays. It features a lightweight Web UI for template editing and a blazing-fast, memory-safe backend powered by SkiaSharp and SVT-AV1.
(Placeholder: Add a screenshot of your Fabric.js UI here)
(Placeholder: Link to a GIF or YouTube video showing the UI setup and the fast generation process)
- Visual Template Editor: Drag-and-drop web UI (Fabric.js) wrapped in a native lightweight desktop window (Photino.NET). Easily set up text coordinates, bounding boxes, colors, and alignments.
- Blazing Fast Generation: Achieves up to 9 images per second on modern CPUs using a highly optimized multi-threaded architecture.
- Memory-Safe Pipeline: Replaced traditional heavy libraries (like ImageMagick) with SkiaSharp for rendering, completely eliminating memory leaks during massive batch runs.
- Smart Text Rendering: Custom auto-scaling and word-wrap algorithms ensure that dynamic text from CSV files perfectly fits within defined boundaries without overflowing.
- SVT-AV1 Integration: Utilizes the official
avifencutility with the SVT-AV1 engine, converting standard RGB rendering into highly compressed YUV 4:2:0 AVIF files.
- Core: C#, .NET
- Desktop App Wrapper: Photino.NET
- Graphics Engine: SkiaSharp
- Encoder:
avifenc(libavif with SVT-AV1 support) - Frontend (UI): HTML/JS, Fabric.js
Before running or building the project, ensure you have the following installed:
- .NET SDK (version 8.0 or higher).
avifencexecutable:
- Windows: Place
avifenc.exein the root folder of the project or ensure it is in your system'sPATH. - Linux: Install
libavif-bincompiled with SVT-AV1 support.
- Fonts (Linux only): If deploying on Linux or Docker, ensure font libraries are installed:
sudo apt-get install fontconfig libfontconfig1 fonts-liberation
The application can be compiled into a single, self-contained executable, removing the need for the end-user to install the .NET runtime.
For Windows (GUI App, no console window):
dotnet publish -c Release -r win-x64 --self-contained true -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true
For Windows (With console window for debugging):
dotnet publish -c Release -r win-x64 --self-contained true -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -p:OutputType=Exe
For Linux:
dotnet publish -c Release -r linux-x64 --self-contained true -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true
- Launch the App: Open the compiled executable.
- Load Template: Select your base image (PNG/JPG) using the UI.
- Map Fields: Draw bounding boxes where you want your CSV data to appear. Configure font sizes, colors, and alignments.
- Load Data: Select your
.csvfile containing the dynamic content. - Generate: Hit "Run". The app will instantly process the batch, dynamically scale text to fit the boxes, and output highly compressed
.aviffiles to your chosen directory.
To achieve high throughput without choking the system, the generator utilizes a hybrid threading approach:
- Concurrent Image Processing: Reads and renders images in RAM asynchronously using
Parallel.ForEachAsync(limited to 1/4 of total logical cores). - Dedicated Encoder Threads: Allocates the remaining CPU cores directly to the
avifencthreads (-jparameter) for maximum SVT-AV1 encoding efficiency. - Zero-Leak Policy: SkiaSharp renders to a temporary OS file buffer, which is immediately garbage-collected and cleaned up post-encoding via strict
finallyblocks.