Completely removed GDI
Some checks failed
Build Windows Avalonia / build (push) Failing after 1m47s

This commit is contained in:
Maddo 2026-05-28 20:27:05 +02:00
commit d76e133f18
31 changed files with 236 additions and 2592 deletions

View file

@ -42,21 +42,17 @@ The main app launches Avalonia directly. Dialog events (`SelectSourceFolderReque
1. User configures paths/settings in the UI (`DataModel.cs` — MVVM ViewModel)
2. `ProcessImagesCommand` triggers `ImageCreationService`
3. `ImageCreationService` processes files in parallel chunks, with configurable concurrency and batch size (GC flush between chunks)
4. Each file is handled by an `IImageCreator` implementation (GDI+ or ImageSharp)
4. Each file is handled by the ImageSharp `IImageCreator` implementation
5. Output: resized/watermarked/overlaid images written to a destination folder hierarchy
### Key Abstractions (MaddoShared)
- **`IImageCreator`** — single async method to process one image; two implementations: `ImageCreatorGDI` (System.Drawing) and `ImageCreatorSharp` (SixLabors.ImageSharp)
- **`IImageCreator`** — single async method to process one image; implemented by `ImageCreatorImageSharp` (SixLabors.ImageSharp)
- **`ImageCreationService`** — parallel orchestrator; uses `AsyncEnumerator` with chunking; loads logo once, clones per thread for thread safety
- **`ImageState`** — per-file processing context (input path, EXIF orientation, thumbnail sizes, overlays, logo, rotation)
- **`PicSettings`** — 50+ property configuration model (dimensions, fonts, colors, JPEG quality, watermark, logo positioning, `ImageCreatorProvider` selector)
- **`PicSettings`** — 50+ property configuration model (dimensions, fonts, colors, JPEG quality, watermark, logo positioning)
- **`FileHelperSharp`** — recursive file enumeration with folder-per-N-files mapping and counter formatting
### Implementation Selection
`PicSettings.ImageCreatorProvider` switches between `"Sharp"` (SixLabors.ImageSharp) and `"Alternate"` (GDI+) at runtime.
## Conventions
### C# Style