imazen / imazen/imageflow-dotnet
Expose target=fast|optimal + acceptable-format selection and optimality/resource annotations (passthrough from imageflow core #728)
- Dominant language
- C#
- Stars
- 166
- Forks
- 29
- PR merge metrics
- No merged PRs in 30d
Description
## Summary
Surface the proposed imageflow-core `target=fast|optimal` + acceptable-format-list encode directive — and its result annotations (chosen format/effort, `is_optimal` flag, resource estimate) — through the .NET Fluent API and `BuildJobResult`.
**Depends on:** imazen/imageflow#728 (core job-JSON support + zencodec passthrough).
## Motivation
Imageflow Server's background re-encode queue (FastFirstThenUpgrade) needs to:
1. ask for a **fast** encode and pass the **client-acceptable format list** (`avif`/`jxl`/`webp` + fallback), letting the core choose the format; and
2. read back **which format/effort was chosen** and **whether the result is already optimal**, to decide whether to enqueue a background upgrade (and what cache TTL to set).
## Requested
1. **Fluent / job-JSON support** for the `target` directive + acceptable-format list — e.g. on `ImageJob` / `FinishJobBuilder`, or via the command string — passed straight through to the core.
2. **Result annotations** on `BuildJobResult`: chosen format, chosen effort, `IsOptimal` / `WouldNotImprove`, and the resource estimate.
- Make these **first-class and public** instead of reflection-scraped. The killbits server branch currently reads a `codec_substitution` annotation via reflection (`CodecSubstitutionObserver`) because the annotation API isn't public yet — this issue should make the annotation surface public/stable so consumers don't reflect into internals.
3. Honor the existing `SecurityOptions` (killbits) caps when forwarding the acceptable list.
## Consumer
Imageflow Server (`Imageflow.Server`) — `AddImageflowBackgroundReencoding` + `SetFormatNegotiation`. Today it would hardcode fast/optimal format heuristics; this lets the core/zencodec own the decision and report optimality back.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.