diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index 51fe5db60e..9ba55da629 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -1,6 +1,6 @@
# Changes here need a review from one of these people (main's ruleset requires code-owner review).
# Workflows, and the scripts and tooling the release jobs hand signing secrets to.
-# See docs/releasing.md, "Who can start a release".
+# See docs/release-process.md, "Who can start a release".
/.github/workflows/ @emmertex @clydecbrown @OneSlips
/.github/scripts/ @emmertex @clydecbrown @OneSlips
/.github/CODEOWNERS @emmertex @clydecbrown @OneSlips
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index 87f3994796..c98a56af9c 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -26,7 +26,7 @@ Fixes #
## How it was checked
-- [ ] `cargo xtask ci --fast`, `cargo xtask sil` and `cargo test -p` for the touched crates pass on this branch, up to
+- [ ] `cargo xtask ci --quick`, `cargo xtask sil` and `cargo test -p` for the touched crates pass on this branch, up to
date with `staging` (merged in, not rebased)
- [ ] A test that fails without this change (for a crash fix: a hostile-input check that the bad input gives an
error, not a panic)
@@ -67,7 +67,7 @@ Fixes #
free in `docs/library-shortcuts.md`
- [ ] The feature's rows in `docs/parity-checklist.md` and its entry in `docs/gaps.md` are updated, honestly (🟡 when
it is partial), in the same commit
-- [ ] User-visible change: the manual is updated in the same commit (`docs/manual-site/`, `docs/manual/`; pages: ______),
+- [ ] User-visible change: the manual is updated in the same commit (`docs/manual-site/`; pages: ______),
and screenshots it made stale are retaken or marked `` — or this changes nothing a user sees
- [ ] New code has a caller: no command, module or setting that nothing reaches yet
- [ ] Every new image, icon or other asset has its entry in `assets/ATTRIBUTION.md`; no font or media files added
diff --git a/.github/PULL_REQUEST_TEMPLATE/licence-conversion.md b/.github/PULL_REQUEST_TEMPLATE/licence-conversion.md
new file mode 100644
index 0000000000..50e106ffea
--- /dev/null
+++ b/.github/PULL_REQUEST_TEMPLATE/licence-conversion.md
@@ -0,0 +1,45 @@
+
+
+## What this converts
+
+
+
+## Permission
+
+
+
+- [ ] The copyright holder requested this conversion, or is the author of this PR
+- [ ] Every converted file is the contributor's own work, not adopted third-party or vendored code
+- [ ] Files owned by other copyright holders are untouched, with their notices intact
+
+## Change
+
+- [ ] Licence fields and headers now say `GPL-3.0-or-later` (or the crate's existing GPL-compatible expression)
+- [ ] `NOTICE`, `assets/ATTRIBUTION.md` and any README or licence statement for the converted work updated
+- [ ] `docs/license-status.md` updated in this PR: inventory row, ambiguity cleared, and the "Next" list
+- [ ] Adopted third-party licences and notices were not weakened or removed
+
+## How it was checked
+
+- [ ] `git grep -n -i 'MIT\|Apache-2.0'` on the converted paths: remaining hits are adopted code and correct
+- [ ] `cargo xtask brand check`, `cargo xtask docs --check` and `cargo xtask assets` pass
+- [ ] `cargo deny check licenses` passes when a manifest changed (or "no manifest change")
+
+## Notes
+
+
diff --git a/.github/scripts/sign-checksums.sh b/.github/scripts/sign-checksums.sh
index 08cbca9f6d..3d3dafb68f 100755
--- a/.github/scripts/sign-checksums.sh
+++ b/.github/scripts/sign-checksums.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
# Signs a release's SHA256SUMS.txt for the in-app updater, which installs nothing without a valid
-# signature (crates/updater/src/signature.rs, docs/releasing.md → Update signing key).
+# signature (crates/updater/src/signature.rs, docs/release-process.md → Update signing key).
#
# UPDATE_SIGNING_KEY= .github/scripts/sign-checksums.sh
#
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 6a41ef0c3b..8dd3b0f706 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -1,6 +1,6 @@
# Release pipeline: every push to `release` builds platform artifacts (signed where credentials
# are configured) and creates or updates the draft GitHub Release " v".
-# See docs/releasing.md.
+# See docs/release-process.md.
#
# The version job creates (or reuses) the draft; each platform job uploads its own files to it with
# `gh release upload` (Actions artifacts crawl from the self-hosted runners), plus a few-byte checksum
@@ -12,7 +12,7 @@
# without it. Only the `release` branch drafts a release: elsewhere the version job refuses unless
# it is a dry run.
#
-# Every job runs on the maintainer's self-hosted runners (docs/ci.md, docs/releasing.md): Linux and
+# Every job runs on the maintainer's self-hosted runners (docs/ci.md, docs/release-process.md): Linux and
# Flatpak in containers on gpu0, Android (arm64 + x86_64, cross-compiled) on gpu0, macOS on mac0,
# Windows x64 on win0, Windows ARM64 natively on SNAPDRAGON. A manual dispatch is a dry run by default
# (`dry_run`): the signing jobs then run without the `release` environment (unsigned), no draft is
@@ -135,7 +135,7 @@ jobs:
- id: draft
name: Create or reuse the draft release
# Platform jobs upload into it as they finish; the release job adds checksums, latest.json and
- # notes. It stays a draft: publishing is a separate, manual step (docs/releasing.md).
+ # notes. It stays a draft: publishing is a separate, manual step (docs/release-process.md).
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
@@ -293,7 +293,7 @@ jobs:
permissions:
contents: write
# Self-hosted: x64 on win0, ARM64 natively on SNAPDRAGON (Windows on ARM with the ARM64 MSVC tools;
- # win0 has none). Signing and WiX run the same on both. docs/releasing.md.
+ # win0 has none). Signing and WiX run the same on both. docs/release-process.md.
runs-on: ${{ fromJSON(matrix.runner) }}
environment: ${{ (github.event_name == 'workflow_dispatch' && inputs.dry_run) && '' || 'release' }}
strategy:
@@ -438,7 +438,7 @@ jobs:
# Self-hosted gpu0, in an Ubuntu 22.04 container, so the binaries only need glibc >= 2.35 (Ubuntu
# 22.04+, Debian 12+, Fedora 36+, RHEL 10). Rust, the cargo registry and the target dir live in
# named Docker volumes (incremental between runs; never the runners' own target dirs). See
- # docs/releasing.md.
+ # docs/release-process.md.
runs-on: [self-hosted, Linux, X64, lcc]
container:
image: ubuntu:22.04
@@ -1070,7 +1070,7 @@ jobs:
done ` `` ``
- `` ``.
+- Docs (Markdown) just write the real names: Chromaforge, `chromaforge`, `chromaforge-cli`, `CHROMAFORGE_*`. Templates
+ (`README.md.in`, `calibrate-lightroom.md.in`) use `{{…}}` fields where a value must be rendered (`{{website}}`,
+ `{{cli_binary}}`, …), rendered by `cargo xtask docs`.
- Crates `lcc-*`; binaries `lcc-app`/`lcc-cli`/`lcc-web`; in `target/` always `app`/`app-cli` (brand names via
- `cargo xtask run|package|install`). Env vars `_X` (e.g. `_PROFILE`); legacy prefix still read.
+ `cargo xtask run|package|install`). Env vars `CHROMAFORGE_X` (e.g. `CHROMAFORGE_PROFILE`); legacy prefix still read.
## Session start
1. [`docs/status.md`](docs/status.md) (tracked: milestone, next task, blockers, metrics) → the local plan it names
@@ -44,7 +44,7 @@ This is the one rulebook for agents and humans; `CLAUDE.md` only imports it. Cla
`gh pr update-branch N` does). PRs to `staging` run the fast gate only — no tests; the full suite gates the
periodic batch PR `staging` → `main`, which lands once green and is what keeps `main` tested (nightly and
fuzzing guard it afterwards; [docs/ci.md](docs/ci.md)). Merge agent branches one at a time with
-`cargo xtask ci --fast` + targeted tests between (two green branches can still conflict). Resuming after a crash:
+`cargo xtask ci --quick` + targeted tests between (two green branches can still conflict). Resuming after a crash:
check `git status` on staging, `git worktree list`, `staging..HEAD` per worktree; commit small and often.
**Permanent branches:** `staging`, `main` and `release` are never deleted, renamed or force-pushed, and none of
@@ -71,7 +71,8 @@ never a panic. Never ship a panic path; fix crashes before building on them. Thi
(JNI VM/activity adoption), `crates/winspool` (Win32 print spooler), `crates/winmsi` (`MsiEnumClientsW` +
`MsiGetComponentPathW` for the updater), `crates/winjob` (a kill-on-close job object, so the Windows CLI
launcher's app ends with it), `crates/firstclick` (macOS: replaces `acceptsFirstMouse:` on winit's window view,
- for the background-click setting), `crates/libraw` (FFI into its C shim over LibRaw, opt-in, see Non-negotiables), and `apps/android`'s `#[unsafe(no_mangle)] android_main`. Every other
+ for the background-click setting), `crates/opendocs` (macOS: adds `application:openURLs:` to winit's application
+ delegate, so photos opened from Finder, the Dock or Open With reach the app), `crates/libraw` (FFI into its C shim over LibRaw, opt-in, see Non-negotiables), and `apps/android`'s `#[unsafe(no_mangle)] android_main`. Every other
production crate root has `#![forbid(unsafe_code)]`. New unsafe need → isolated, well-tested helper crate:
`// SAFETY:` everywhere, safe API, safe fallback, and a line here naming it.
- Input-derived numbers are hostile: `get()` not `[i]`/`[a..b]`; checked/saturating math; no division by zero,
@@ -113,12 +114,12 @@ never a panic. Never ship a panic path; fix crashes before building on them. Thi
- **Release notes:** one file per change: `docs/whats-new/-.md` (one `### Title` + bullets) and,
if the changelog should mention it, `docs/changelog/unreleased/-.md` (one `## Section` + bullets);
READMEs there say how. Never touch `docs/whats-new.md` (frozen) or released `docs/changelog/.md`;
- `cargo xtask notes --check` (in `ci`) fails if `docs/whats-new.md` changes outside an upstream merge.
+ `cargo xtask notes --check` (in `ci`) fails if `docs/whats-new.md` changes.
- **The manual moves with the product:** any change a user can notice (new/changed/removed feature, command, menu item,
panel, slider, setting, shortcut, default, file format, platform or install step, or a screenshot that no longer
- matches) updates the manual **in the same commit**. The manual has two parts: the page-per-feature site in
+ matches) updates the manual **in the same commit**. The manual is the page-per-feature site in
`docs/manual-site/src/content/docs/` (picture-first; rules and screenshot runner in
- [`docs/manual-site/AUTHORING.md`](docs/manual-site/AUTHORING.md)) and the markdown guide in `docs/manual/`. Edit the
+ [`docs/manual-site/AUTHORING.md`](docs/manual-site/AUTHORING.md)). Edit the
page that names the feature, or add one; fix every sentence the change makes false; retake affected shots
(`scripts/shots.d/.json`) or mark them ``; add a row to `reference/` when it adds a menu item or
shortcut. Removing a feature removes its manual text. Mention "Manual: " (or "Manual: none, no user-visible
@@ -136,12 +137,15 @@ never a panic. Never ship a panic path; fix crashes before building on them. Thi
## Third-party sources: licence and derivation policy
One rule (2026-11-10): **use only material you may legally derive from.**
-- **In:** licences allowing derivatives + sharing + commercial use — permissive (MIT, BSD, Apache-2.0, ISC, Zlib, …)
- and share-alike (GPL, LGPL, AGPL, CC BY, CC BY-SA, CC0/public domain), open source or not. Read, port, bundle, ship.
+- **In, external dependencies:** licences allowing derivatives + sharing + commercial use — GPL, LGPL, AGPL,
+ Apache-2.0, MIT, BSD, ISC, Zlib, CC BY, CC BY-SA, CC0/public domain. Dependencies are complete modules/libraries.
+- **In, code copied into this repository:** adopted code must be GPL-3.0-compatible GPL or Apache-2.0. MIT is
+ allowed only as a complete, isolated module/library or a plugin; never merged into core. Core code is
+ `GPL-3.0-or-later` only.
- **Out:** CC BY-NC, CC BY-ND, "research only"/"non-commercial", no licence, Adobe's own files (DCP/LCP, presets,
assets — proprietary).
-- Share-alike code in a distributed binary puts the binary under those terms; our dual licence already offers
- GPL-3.0-or-later; `NOTICE` says what shipped.
+- Share-alike code in a distributed binary puts the binary under those terms; our GPL-3.0-or-later licence and
+ `NOTICE` say what shipped.
- **Provenance:** every port names its source — commit **Sources:** line, module docs saying "translated from"/"read
as a reference" (never "no code copied" when structure follows a source), `NOTICE` credit + licence text next to the
material.
@@ -157,19 +161,29 @@ One rule (2026-11-10): **use only material you may legally derive from.**
synthetic charts or on photos whose owner agrees, fit our own models to it, and ship the fitted parameters or
tables as data (e.g. Capture One midtone tables in `crates/develop/src/levels_table.rs`; Lightroom tone-slider fits
for #1120/#1124). Name the source app, method and sample set in module docs and `NOTICE`. Only the numbers ship: no
- copied files, assets or rendered photos. Camera calibrations still go through ` calibrate-lightroom add`.
+ copied files, assets or rendered photos. Camera calibrations still go through `chromaforge-cli calibrate-lightroom add`.
- Now usable (with provenance): darktable/Ansel sources, all of dcraw incl. the GPL RESTRICTED (Foveon) block, LibRaw
and other dcraw descendants, rawspeed/rawloader/rawler/dnglab/RawTherapee/ART, GPL data tables (noiseprofiles,
wb_presets, colormatrices, basecurves). Quality habits stay: camera data ranks measured > spectral > dcraw tables
(`lcc_camdb::Source::Dcraw` via `tools/dcraw_adobe_coeff.py`); decoder layouts verified on CC0 samples; dcraw 1.478
(2018) predates CR3/Nikon HE/ARQ — no readable reference for those.
-- Ports built on share-alike sources are Chromaforge-only, never offered upstream (upstream doesn't share this
- policy).
+- Ports built on share-alike sources stay Chromaforge-only; record the source and licence in the module and
+ `NOTICE`.
- Dependencies follow the same rule; `cargo deny` enforces the `deny.toml` allow-list (extend it as licences open up)
and the `[sources] allow-git` list.
-- **Licence (2026-11-10):** workspace default `MIT OR GPL-3.0-or-later` (root `Cargo.toml`; text:
- `LICENSE-GPL-3.0.txt`); share-alike contributions welcome. `crates/segment` + `crates/fetch`:
- `Apache-2.0 OR GPL-3.0-or-later` (`LICENSE-APACHE` per crate). Keep upstream notices in `LICENSE`/`NOTICE`.
+- **Licence (2026-11-10; GPL core 2026-11-30):** core code (workspace default and every project-only `lcc-*` crate)
+ is `GPL-3.0-or-later` only (root `Cargo.toml`; text: `LICENSE-GPL-3.0.txt`). Adopted code must be GPL-3.0-compatible
+ or Apache-2.0; MIT is allowed only as a complete, isolated module/library or plugin. Crates carrying adopted code:
+ `lcc-camprof` is `GPL-3.0-or-later OR MIT OR Apache-2.0`; `lcc-fetch`, `lcc-segment` and `lcc-tflite` are
+ `GPL-3.0-or-later OR Apache-2.0`. Adopted code keeps its original licence and `NOTICE` entry; the MIT text stays in
+ `LICENSE`. Contributions are accepted under GPL-3.0-or-later only. The non-`lcc` `sdk/*` crates stay MIT as
+ complete libraries/plugins.
+- **Existing contributions (2026-11-30):** if the person you are working with has code in this repository that is
+ still under MIT or another permissive licence, ask them once whether they want to convert their own work to
+ `GPL-3.0-or-later` — only the copyright holder can. If yes, follow
+ [`docs/licence-conversion.md`](docs/licence-conversion.md) and use its PR template; update
+ [`docs/license-status.md`](docs/license-status.md) in the same PR. Never convert adopted third-party code or
+ remove another holder's notice.
## Assets (absolute)
- **No Adobe assets** — icons, screenshots, presets, profiles, LUTs, fonts, even open-licensed Adobe ones (Source
@@ -224,10 +238,10 @@ One rule (2026-11-10): **use only material you may legally derive from.**
`apps/cli/tests/`) → app smoke (control script + `ui.screenshot`). Land at the lowest level that catches the
regression, plus the level above when behaviour spans layers. Crash fixes always get the hostile-input check.
- After every user-visible change: run the app, screenshot, look; `ui.inspect` → `perf`.
-- Measure, don't guess: `_PROFILE=1` prints per-stage timings to stderr; `/usr/bin/time` for CLI renders;
+- Measure, don't guess: `CHROMAFORGE_PROFILE=1` prints per-stage timings to stderr; `/usr/bin/time` for CLI renders;
record numbers in `docs/status.md` → Metrics. Budgets: slider ≤ 16 ms (draft), loupe ≤ 60 ms @ ~2.5 MP, export
≤ 1 s per 24 MP JPEG.
-- Perf workflow: measure before (`cargo xtask bench` or `_PROFILE=1`), change one thing, measure again,
+- Perf workflow: measure before (`cargo xtask bench` or `CHROMAFORGE_PROFILE=1`), change one thing, measure again,
record both. Bench numbers compare only as same-machine, controlled-environment before/after pairs — never across
machines or unrelated runs; `cargo xtask bench` (24 MP raw, CPU+GPU columns) flags > 20 % CPU regressions
(`--strict` fails). No speed-up claims from single noisy runs; complexity must earn its cost.
@@ -241,11 +255,3 @@ One rule (2026-11-10): **use only material you may legally derive from.**
`stats`, `brand check`, `docs`, `run`, `package`, `install`); `testkit` = test helpers (dev-dep only).
Nix: `nix build` (binaries + fonts + desktop metadata; community-maintained, CI only evaluates it),
`nix develop` = dev shell.
-
-## Contributor credits
-- Credits live in `contributors/contributors.json` (generated, never hand-edit) and `contributors/people.toml`
- (the app no longer shows them). See `docs/contributors.md`.
-- Agents: if your human's username lacks a `[people.]` entry, ask them once whether they want a real/
- display/synced-GitHub name; if yes, add **only their own** entry (template at the file top) in their PR, committed
- as them. Never add or edit anyone else's entry; never touch `contributors.json`.
-- Maintainers refresh stats with `python3 contributors/fork-contributors.py` (`gh` signed in, `upstream` fetched).
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 13dd38a3d9..bdf8b2db85 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -8,9 +8,10 @@ Questions/ideas: [the Discord](https://discord.gg/c3dfYATzsQ), [project channel]
- [`docs/gaps.md`](docs/gaps.md) (impact-ranked; `B` = beta blocker), [`docs/parity-checklist.md`](docs/parity-checklist.md)
(one row per feature/menu item/shortcut), or a GitHub issue.
- **Check nobody has it:** claims live in issue comments; search open PRs for the issue number and checklist id.
-- **Check upstream:** upstream is no longer merged — each round is reviewed and ported by hand
- ([`docs/upstream-pr-intake.md`](docs/upstream-pr-intake.md)), landing as one fork PR. Search the log and open PRs
- for the upstream issue/PR number before starting; the fix may be ported already or due to be.
+- **Upstream:** no code is taken, ever — no PRs, commits, patches or merges, whatever the licence. Use it for ideas
+ and observed behaviour, then rewrite; do not copy code or open intake PRs. Adopted code from other sources must
+ be GPL-3.0-compatible or Apache-2.0; MIT only as a complete, isolated module/library or plugin
+ ([`docs/upstream-pr-intake.md`](docs/upstream-pr-intake.md)).
## Claim it
@@ -23,7 +24,8 @@ issue. A checklist row with no issue is named in the PR title instead.
target `main` directly — batches of `staging` land there together, see [`docs/ci.md`](docs/ci.md); `staging`,
`main` and `release` are permanent and never a PR's head). GitHub merges
only up-to-date branches: when `staging` moves, merge it in, re-run the checks, push.
-- **Template** ([`.github/PULL_REQUEST_TEMPLATE.md`](.github/PULL_REQUEST_TEMPLATE.md)); one change per PR.
+- **Template** ([`.github/PULL_REQUEST_TEMPLATE.md`](.github/PULL_REQUEST_TEMPLATE.md)); a licence conversion uses
+ [`licence-conversion.md`](.github/PULL_REQUEST_TEMPLATE/licence-conversion.md). One change per PR.
- **Title:** task/checklist id first, as commits do (`LR-IMP-FORMATS: …`), or `Issue #123: …`.
- **Description:** `Fixes #123` (or `Part of #123`); what you changed and how you checked it (tests, app,
screenshots for UI).
@@ -35,7 +37,7 @@ issue. A checklist row with no issue is named in the PR title instead.
- **One task id per commit**, with the docs it moves (parity-checklist rows, gaps entry, ROADMAP/target-app-parity
numbers) in the same commit.
- **Manual:** a user-visible change (feature, menu item, setting, shortcut, default, platform, screenshot) updates the
- matching page in `docs/manual-site/src/content/docs/` and/or `docs/manual/` in the same commit; see
+ matching page in `docs/manual-site/src/content/docs/` in the same commit; see
[`docs/manual-site/AUTHORING.md`](docs/manual-site/AUTHORING.md). The PR says which pages, or "none".
- **Release notes:** user-visible changes add `docs/whats-new/-.md` (+ `docs/changelog/unreleased/…`);
the READMEs there say how.
@@ -43,16 +45,13 @@ issue. A checklist row with no issue is named in the PR title instead.
What may be read: [`AGENTS.md`](AGENTS.md) → third-party policy.
- **Assets:** every image/icon/font gets an [`assets/ATTRIBUTION.md`](assets/ATTRIBUTION.md) entry in the same
commit. New fonts go to [craft-fonts](https://github.com/storytold/craft-fonts), not here.
-- **Licence:** contributions are offered under the licence of the code you change — `MIT OR GPL-3.0-or-later`
- (default; GPL-3.0-or-later share-alike welcome, [`LICENSE-GPL-3.0.txt`](LICENSE-GPL-3.0.txt)); `crates/segment` +
- `crates/fetch` also offer Apache-2.0.
+- **Licence:** core contributions are offered under `GPL-3.0-or-later` only
+ ([`LICENSE-GPL-3.0.txt`](LICENSE-GPL-3.0.txt)). Adopted code must be GPL-3.0-compatible or Apache-2.0; MIT only as
+ a complete, isolated module/library or plugin. Adopted code keeps its original licence and `NOTICE` entry.
+ If you contributed your own code before 2026-11-30, you can convert it to `GPL-3.0-or-later`: see
+ [`docs/licence-conversion.md`](docs/licence-conversion.md).
- CI is maintainer-run; a fork PR's result can come back hours after push.
-## Credits
-
-The About window credits everyone by GitHub username; add a real/display name via **your own** entry in
-`contributors/people.toml` ([`docs/contributors.md`](docs/contributors.md)). Only ever change your own entry.
-
## Working with an agent
Your agent follows [`AGENTS.md`](AGENTS.md) and this page; you are the author of what it submits — read its PR
diff --git a/Cargo.lock b/Cargo.lock
index 7aaf25fc87..60aff04684 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1486,16 +1486,38 @@ dependencies = [
[[package]]
name = "craft-docpath"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=4dc543cb449cc232e4c3d58f78a05c1ab169db9e#4dc543cb449cc232e4c3d58f78a05c1ab169db9e"
+source = "git+https://github.com/storytold/craft-libs?rev=27c2cbf821ccf3842f789484f0234460cfcd07a6#27c2cbf821ccf3842f789484f0234460cfcd07a6"
+dependencies = [
+ "serde",
+]
[[package]]
name = "craft-media"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=c5a1cbfb5f9049f9270955caffb5bee5997aebf7#c5a1cbfb5f9049f9270955caffb5bee5997aebf7"
+source = "git+https://github.com/storytold/craft-libs?rev=a4db799563c9ccd7217e1731ec34c58f6ba57248#a4db799563c9ccd7217e1731ec34c58f6ba57248"
+dependencies = [
+ "thiserror 2.0.21",
+]
+
+[[package]]
+name = "craft-time"
+version = "0.1.0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4db799563c9ccd7217e1731ec34c58f6ba57248#a4db799563c9ccd7217e1731ec34c58f6ba57248"
dependencies = [
+ "serde",
"thiserror 2.0.21",
]
+[[package]]
+name = "craft-timeline"
+version = "0.1.0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4db799563c9ccd7217e1731ec34c58f6ba57248#a4db799563c9ccd7217e1731ec34c58f6ba57248"
+dependencies = [
+ "craft-time",
+ "serde",
+ "web-time",
+]
+
[[package]]
name = "craft-ui"
version = "0.1.0"
@@ -2525,8 +2547,8 @@ checksum = "64cd1e32ddd350061ae6edb1b082d7c54915b5c672c389143b9a63403a109f24"
[[package]]
name = "filmcraft-aac"
-version = "0.17.0"
-source = "git+https://github.com/emmertex/filmcraft?rev=3f0cb5f2a906087e5fdc1cd0bb685527da717ba4#3f0cb5f2a906087e5fdc1cd0bb685527da717ba4"
+version = "0.21.0"
+source = "git+https://github.com/emmertex/filmcraft?rev=4b82c5a1337dfad846a4a50e868c57ae4502f06c#4b82c5a1337dfad846a4a50e868c57ae4502f06c"
dependencies = [
"filmcraft-bitstream",
"thiserror 2.0.21",
@@ -2534,16 +2556,16 @@ dependencies = [
[[package]]
name = "filmcraft-ac3"
-version = "0.17.0"
-source = "git+https://github.com/emmertex/filmcraft?rev=3f0cb5f2a906087e5fdc1cd0bb685527da717ba4#3f0cb5f2a906087e5fdc1cd0bb685527da717ba4"
+version = "0.21.0"
+source = "git+https://github.com/emmertex/filmcraft?rev=4b82c5a1337dfad846a4a50e868c57ae4502f06c#4b82c5a1337dfad846a4a50e868c57ae4502f06c"
dependencies = [
"thiserror 2.0.21",
]
[[package]]
name = "filmcraft-apv"
-version = "0.17.0"
-source = "git+https://github.com/emmertex/filmcraft?rev=3f0cb5f2a906087e5fdc1cd0bb685527da717ba4#3f0cb5f2a906087e5fdc1cd0bb685527da717ba4"
+version = "0.21.0"
+source = "git+https://github.com/emmertex/filmcraft?rev=4b82c5a1337dfad846a4a50e868c57ae4502f06c#4b82c5a1337dfad846a4a50e868c57ae4502f06c"
dependencies = [
"filmcraft-bitstream",
"rayon",
@@ -2552,8 +2574,8 @@ dependencies = [
[[package]]
name = "filmcraft-av1"
-version = "0.17.0"
-source = "git+https://github.com/emmertex/filmcraft?rev=3f0cb5f2a906087e5fdc1cd0bb685527da717ba4#3f0cb5f2a906087e5fdc1cd0bb685527da717ba4"
+version = "0.21.0"
+source = "git+https://github.com/emmertex/filmcraft?rev=4b82c5a1337dfad846a4a50e868c57ae4502f06c#4b82c5a1337dfad846a4a50e868c57ae4502f06c"
dependencies = [
"filmcraft-bitstream",
"rayon",
@@ -2562,24 +2584,24 @@ dependencies = [
[[package]]
name = "filmcraft-bitstream"
-version = "0.17.0"
-source = "git+https://github.com/emmertex/filmcraft?rev=3f0cb5f2a906087e5fdc1cd0bb685527da717ba4#3f0cb5f2a906087e5fdc1cd0bb685527da717ba4"
+version = "0.21.0"
+source = "git+https://github.com/emmertex/filmcraft?rev=4b82c5a1337dfad846a4a50e868c57ae4502f06c#4b82c5a1337dfad846a4a50e868c57ae4502f06c"
dependencies = [
"craft-media",
]
[[package]]
name = "filmcraft-color"
-version = "0.17.0"
-source = "git+https://github.com/emmertex/filmcraft?rev=3f0cb5f2a906087e5fdc1cd0bb685527da717ba4#3f0cb5f2a906087e5fdc1cd0bb685527da717ba4"
+version = "0.21.0"
+source = "git+https://github.com/emmertex/filmcraft?rev=4b82c5a1337dfad846a4a50e868c57ae4502f06c#4b82c5a1337dfad846a4a50e868c57ae4502f06c"
dependencies = [
"serde",
]
[[package]]
name = "filmcraft-dnx"
-version = "0.17.0"
-source = "git+https://github.com/emmertex/filmcraft?rev=3f0cb5f2a906087e5fdc1cd0bb685527da717ba4#3f0cb5f2a906087e5fdc1cd0bb685527da717ba4"
+version = "0.21.0"
+source = "git+https://github.com/emmertex/filmcraft?rev=4b82c5a1337dfad846a4a50e868c57ae4502f06c#4b82c5a1337dfad846a4a50e868c57ae4502f06c"
dependencies = [
"filmcraft-bitstream",
"rayon",
@@ -2588,8 +2610,8 @@ dependencies = [
[[package]]
name = "filmcraft-frame"
-version = "0.17.0"
-source = "git+https://github.com/emmertex/filmcraft?rev=3f0cb5f2a906087e5fdc1cd0bb685527da717ba4#3f0cb5f2a906087e5fdc1cd0bb685527da717ba4"
+version = "0.21.0"
+source = "git+https://github.com/emmertex/filmcraft?rev=4b82c5a1337dfad846a4a50e868c57ae4502f06c#4b82c5a1337dfad846a4a50e868c57ae4502f06c"
dependencies = [
"filmcraft-color",
"filmcraft-time",
@@ -2599,8 +2621,8 @@ dependencies = [
[[package]]
name = "filmcraft-h264"
-version = "0.17.0"
-source = "git+https://github.com/emmertex/filmcraft?rev=3f0cb5f2a906087e5fdc1cd0bb685527da717ba4#3f0cb5f2a906087e5fdc1cd0bb685527da717ba4"
+version = "0.21.0"
+source = "git+https://github.com/emmertex/filmcraft?rev=4b82c5a1337dfad846a4a50e868c57ae4502f06c#4b82c5a1337dfad846a4a50e868c57ae4502f06c"
dependencies = [
"filmcraft-bitstream",
"rayon",
@@ -2609,8 +2631,8 @@ dependencies = [
[[package]]
name = "filmcraft-h264enc"
-version = "0.17.0"
-source = "git+https://github.com/emmertex/filmcraft?rev=3f0cb5f2a906087e5fdc1cd0bb685527da717ba4#3f0cb5f2a906087e5fdc1cd0bb685527da717ba4"
+version = "0.21.0"
+source = "git+https://github.com/emmertex/filmcraft?rev=4b82c5a1337dfad846a4a50e868c57ae4502f06c#4b82c5a1337dfad846a4a50e868c57ae4502f06c"
dependencies = [
"filmcraft-bitstream",
"rayon",
@@ -2619,8 +2641,8 @@ dependencies = [
[[package]]
name = "filmcraft-hevc"
-version = "0.17.0"
-source = "git+https://github.com/emmertex/filmcraft?rev=3f0cb5f2a906087e5fdc1cd0bb685527da717ba4#3f0cb5f2a906087e5fdc1cd0bb685527da717ba4"
+version = "0.21.0"
+source = "git+https://github.com/emmertex/filmcraft?rev=4b82c5a1337dfad846a4a50e868c57ae4502f06c#4b82c5a1337dfad846a4a50e868c57ae4502f06c"
dependencies = [
"filmcraft-bitstream",
"rayon",
@@ -2629,24 +2651,24 @@ dependencies = [
[[package]]
name = "filmcraft-isobmff"
-version = "0.17.0"
-source = "git+https://github.com/emmertex/filmcraft?rev=3f0cb5f2a906087e5fdc1cd0bb685527da717ba4#3f0cb5f2a906087e5fdc1cd0bb685527da717ba4"
+version = "0.21.0"
+source = "git+https://github.com/emmertex/filmcraft?rev=4b82c5a1337dfad846a4a50e868c57ae4502f06c#4b82c5a1337dfad846a4a50e868c57ae4502f06c"
dependencies = [
"craft-media",
]
[[package]]
name = "filmcraft-matroska"
-version = "0.17.0"
-source = "git+https://github.com/emmertex/filmcraft?rev=3f0cb5f2a906087e5fdc1cd0bb685527da717ba4#3f0cb5f2a906087e5fdc1cd0bb685527da717ba4"
+version = "0.21.0"
+source = "git+https://github.com/emmertex/filmcraft?rev=4b82c5a1337dfad846a4a50e868c57ae4502f06c#4b82c5a1337dfad846a4a50e868c57ae4502f06c"
dependencies = [
"craft-media",
]
[[package]]
name = "filmcraft-mpeg2v"
-version = "0.17.0"
-source = "git+https://github.com/emmertex/filmcraft?rev=3f0cb5f2a906087e5fdc1cd0bb685527da717ba4#3f0cb5f2a906087e5fdc1cd0bb685527da717ba4"
+version = "0.21.0"
+source = "git+https://github.com/emmertex/filmcraft?rev=4b82c5a1337dfad846a4a50e868c57ae4502f06c#4b82c5a1337dfad846a4a50e868c57ae4502f06c"
dependencies = [
"rayon",
"thiserror 2.0.21",
@@ -2654,29 +2676,29 @@ dependencies = [
[[package]]
name = "filmcraft-mpegts"
-version = "0.17.0"
-source = "git+https://github.com/emmertex/filmcraft?rev=3f0cb5f2a906087e5fdc1cd0bb685527da717ba4#3f0cb5f2a906087e5fdc1cd0bb685527da717ba4"
+version = "0.21.0"
+source = "git+https://github.com/emmertex/filmcraft?rev=4b82c5a1337dfad846a4a50e868c57ae4502f06c#4b82c5a1337dfad846a4a50e868c57ae4502f06c"
dependencies = [
"thiserror 2.0.21",
]
[[package]]
name = "filmcraft-mxf"
-version = "0.17.0"
-source = "git+https://github.com/emmertex/filmcraft?rev=3f0cb5f2a906087e5fdc1cd0bb685527da717ba4#3f0cb5f2a906087e5fdc1cd0bb685527da717ba4"
+version = "0.21.0"
+source = "git+https://github.com/emmertex/filmcraft?rev=4b82c5a1337dfad846a4a50e868c57ae4502f06c#4b82c5a1337dfad846a4a50e868c57ae4502f06c"
dependencies = [
"chrono",
]
[[package]]
name = "filmcraft-opus"
-version = "0.17.0"
-source = "git+https://github.com/emmertex/filmcraft?rev=3f0cb5f2a906087e5fdc1cd0bb685527da717ba4#3f0cb5f2a906087e5fdc1cd0bb685527da717ba4"
+version = "0.21.0"
+source = "git+https://github.com/emmertex/filmcraft?rev=4b82c5a1337dfad846a4a50e868c57ae4502f06c#4b82c5a1337dfad846a4a50e868c57ae4502f06c"
[[package]]
name = "filmcraft-prores"
-version = "0.17.0"
-source = "git+https://github.com/emmertex/filmcraft?rev=3f0cb5f2a906087e5fdc1cd0bb685527da717ba4#3f0cb5f2a906087e5fdc1cd0bb685527da717ba4"
+version = "0.21.0"
+source = "git+https://github.com/emmertex/filmcraft?rev=4b82c5a1337dfad846a4a50e868c57ae4502f06c#4b82c5a1337dfad846a4a50e868c57ae4502f06c"
dependencies = [
"filmcraft-bitstream",
"rayon",
@@ -2685,16 +2707,17 @@ dependencies = [
[[package]]
name = "filmcraft-time"
-version = "0.17.0"
-source = "git+https://github.com/emmertex/filmcraft?rev=3f0cb5f2a906087e5fdc1cd0bb685527da717ba4#3f0cb5f2a906087e5fdc1cd0bb685527da717ba4"
+version = "0.21.0"
+source = "git+https://github.com/emmertex/filmcraft?rev=4b82c5a1337dfad846a4a50e868c57ae4502f06c#4b82c5a1337dfad846a4a50e868c57ae4502f06c"
dependencies = [
- "serde",
+ "craft-time",
+ "craft-timeline",
]
[[package]]
name = "filmcraft-vp9"
-version = "0.17.0"
-source = "git+https://github.com/emmertex/filmcraft?rev=3f0cb5f2a906087e5fdc1cd0bb685527da717ba4#3f0cb5f2a906087e5fdc1cd0bb685527da717ba4"
+version = "0.21.0"
+source = "git+https://github.com/emmertex/filmcraft?rev=4b82c5a1337dfad846a4a50e868c57ae4502f06c#4b82c5a1337dfad846a4a50e868c57ae4502f06c"
dependencies = [
"filmcraft-bitstream",
"rayon",
@@ -4581,6 +4604,7 @@ dependencies = [
"lcc-gpu",
"lcc-gpumem",
"lcc-hdrmeta",
+ "lcc-opendocs",
"lcc-pipeline",
"lcc-preview",
"lcc-raster",
@@ -5325,6 +5349,17 @@ dependencies = [
"thiserror 2.0.21",
]
+[[package]]
+name = "lcc-opendocs"
+version = "26.49.0"
+dependencies = [
+ "block2 0.6.2",
+ "log",
+ "objc2 0.6.4",
+ "objc2-app-kit 0.3.2",
+ "objc2-foundation 0.3.2",
+]
+
[[package]]
name = "lcc-pdf"
version = "26.49.0"
diff --git a/Cargo.toml b/Cargo.toml
index 86aa1a22b8..1af6b171cf 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -8,12 +8,12 @@ exclude = ["vendor", "sdk"]
[workspace.package]
version = "26.49.0"
edition = "2024"
-license = "MIT OR GPL-3.0-or-later"
+license = "GPL-3.0-or-later"
rust-version = "1.95"
[workspace.dependencies]
craft-ui = { git = "https://github.com/storytold/craft-libs", rev = "4dc543cb449cc232e4c3d58f78a05c1ab169db9e", features = ["serde"] }
-craft-docpath = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "4dc543cb449cc232e4c3d58f78a05c1ab169db9e" }
+craft-docpath = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "27c2cbf821ccf3842f789484f0234460cfcd07a6" }
# internal
lcc-brand = { path = "crates/brand" }
lcc-notes = { path = "crates/notes" }
@@ -31,6 +31,7 @@ lcc-winspool = { path = "crates/winspool" }
lcc-winmsi = { path = "crates/winmsi" }
lcc-winjob = { path = "crates/winjob" }
lcc-firstclick = { path = "crates/firstclick" }
+lcc-opendocs = { path = "crates/opendocs" }
lcc-android-host = { path = "crates/android-host" }
lcc-peer = { path = "crates/peer" }
lcc-sync = { path = "crates/sync" }
diff --git a/LICENSE b/LICENSE
index 03125091b9..f288702d2f 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,23 +1,674 @@
-MIT License
-
-Copyright (c) the LightCraft contributors
-Copyright (c) the PhotoCraft contributors
-Copyright (c) the project contributors
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ Copyright (C)
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+.
diff --git a/LICENSE-APACHE2 b/LICENSE-APACHE2
new file mode 100644
index 0000000000..261eeb9e9f
--- /dev/null
+++ b/LICENSE-APACHE2
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/LICENSE-GPL-3.0.txt b/LICENSE-GPL-3.0.txt
deleted file mode 100644
index f288702d2f..0000000000
--- a/LICENSE-GPL-3.0.txt
+++ /dev/null
@@ -1,674 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc.
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
- The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works. By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users. We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors. You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
- To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights. Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received. You must make sure that they, too, receive
-or can get the source code. And you must show them these terms so they
-know their rights.
-
- Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
- For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software. For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
- Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so. This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software. The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable. Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products. If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
- Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary. To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- TERMS AND CONDITIONS
-
- 0. Definitions.
-
- "This License" refers to version 3 of the GNU General Public License.
-
- "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
- "The Program" refers to any copyrightable work licensed under this
-License. Each licensee is addressed as "you". "Licensees" and
-"recipients" may be individuals or organizations.
-
- To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy. The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
- A "covered work" means either the unmodified Program or a work based
-on the Program.
-
- To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy. Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
- To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies. Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
- An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License. If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
- 1. Source Code.
-
- The "source code" for a work means the preferred form of the work
-for making modifications to it. "Object code" means any non-source
-form of a work.
-
- A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
- The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form. A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
- The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities. However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work. For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
- The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
- The Corresponding Source for a work in source code form is that
-same work.
-
- 2. Basic Permissions.
-
- All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met. This License explicitly affirms your unlimited
-permission to run the unmodified Program. The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work. This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
- You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force. You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright. Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
- Conveying under any other circumstances is permitted solely under
-the conditions stated below. Sublicensing is not allowed; section 10
-makes it unnecessary.
-
- 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
- No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
- When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
- 4. Conveying Verbatim Copies.
-
- You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
- You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
- 5. Conveying Modified Source Versions.
-
- You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
- a) The work must carry prominent notices stating that you modified
- it, and giving a relevant date.
-
- b) The work must carry prominent notices stating that it is
- released under this License and any conditions added under section
- 7. This requirement modifies the requirement in section 4 to
- "keep intact all notices".
-
- c) You must license the entire work, as a whole, under this
- License to anyone who comes into possession of a copy. This
- License will therefore apply, along with any applicable section 7
- additional terms, to the whole of the work, and all its parts,
- regardless of how they are packaged. This License gives no
- permission to license the work in any other way, but it does not
- invalidate such permission if you have separately received it.
-
- d) If the work has interactive user interfaces, each must display
- Appropriate Legal Notices; however, if the Program has interactive
- interfaces that do not display Appropriate Legal Notices, your
- work need not make them do so.
-
- A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit. Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
- 6. Conveying Non-Source Forms.
-
- You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
- a) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by the
- Corresponding Source fixed on a durable physical medium
- customarily used for software interchange.
-
- b) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by a
- written offer, valid for at least three years and valid for as
- long as you offer spare parts or customer support for that product
- model, to give anyone who possesses the object code either (1) a
- copy of the Corresponding Source for all the software in the
- product that is covered by this License, on a durable physical
- medium customarily used for software interchange, for a price no
- more than your reasonable cost of physically performing this
- conveying of source, or (2) access to copy the
- Corresponding Source from a network server at no charge.
-
- c) Convey individual copies of the object code with a copy of the
- written offer to provide the Corresponding Source. This
- alternative is allowed only occasionally and noncommercially, and
- only if you received the object code with such an offer, in accord
- with subsection 6b.
-
- d) Convey the object code by offering access from a designated
- place (gratis or for a charge), and offer equivalent access to the
- Corresponding Source in the same way through the same place at no
- further charge. You need not require recipients to copy the
- Corresponding Source along with the object code. If the place to
- copy the object code is a network server, the Corresponding Source
- may be on a different server (operated by you or a third party)
- that supports equivalent copying facilities, provided you maintain
- clear directions next to the object code saying where to find the
- Corresponding Source. Regardless of what server hosts the
- Corresponding Source, you remain obligated to ensure that it is
- available for as long as needed to satisfy these requirements.
-
- e) Convey the object code using peer-to-peer transmission, provided
- you inform other peers where the object code and Corresponding
- Source of the work are being offered to the general public at no
- charge under subsection 6d.
-
- A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
- A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling. In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage. For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product. A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
- "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source. The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
- If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information. But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
- The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed. Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
- Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
- 7. Additional Terms.
-
- "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law. If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
- When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it. (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.) You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
- Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
- a) Disclaiming warranty or limiting liability differently from the
- terms of sections 15 and 16 of this License; or
-
- b) Requiring preservation of specified reasonable legal notices or
- author attributions in that material or in the Appropriate Legal
- Notices displayed by works containing it; or
-
- c) Prohibiting misrepresentation of the origin of that material, or
- requiring that modified versions of such material be marked in
- reasonable ways as different from the original version; or
-
- d) Limiting the use for publicity purposes of names of licensors or
- authors of the material; or
-
- e) Declining to grant rights under trademark law for use of some
- trade names, trademarks, or service marks; or
-
- f) Requiring indemnification of licensors and authors of that
- material by anyone who conveys the material (or modified versions of
- it) with contractual assumptions of liability to the recipient, for
- any liability that these contractual assumptions directly impose on
- those licensors and authors.
-
- All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10. If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term. If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
- If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
- Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
- 8. Termination.
-
- You may not propagate or modify a covered work except as expressly
-provided under this License. Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
- However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
- Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
- Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License. If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
- 9. Acceptance Not Required for Having Copies.
-
- You are not required to accept this License in order to receive or
-run a copy of the Program. Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance. However,
-nothing other than this License grants you permission to propagate or
-modify any covered work. These actions infringe copyright if you do
-not accept this License. Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
- 10. Automatic Licensing of Downstream Recipients.
-
- Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License. You are not responsible
-for enforcing compliance by third parties with this License.
-
- An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations. If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
- You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License. For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
- 11. Patents.
-
- A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based. The
-work thus licensed is called the contributor's "contributor version".
-
- A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version. For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
- Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
- In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement). To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
- If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients. "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
- If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
- A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License. You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
- Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
- 12. No Surrender of Others' Freedom.
-
- If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all. For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
- 13. Use with the GNU Affero General Public License.
-
- Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work. The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
- 14. Revised Versions of this License.
-
- The Free Software Foundation may publish revised and/or new versions of
-the GNU General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
- Each version is given a distinguishing version number. If the
-Program specifies that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation. If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
- If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
- Later license versions may give you additional or different
-permissions. However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
- 15. Disclaimer of Warranty.
-
- THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. Limitation of Liability.
-
- IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
- 17. Interpretation of Sections 15 and 16.
-
- If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-
- Copyright (C)
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-
-Also add information on how to contact you by electronic and paper mail.
-
- If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
- Copyright (C)
- This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, your program's commands
-might be different; for a GUI interface, you would use an "about box".
-
- You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
-.
-
- The GNU General Public License does not permit incorporating your program
-into proprietary programs. If your program is a subroutine library, you
-may consider it more useful to permit linking proprietary applications with
-the library. If this is what you want to do, use the GNU Lesser General
-Public License instead of this License. But first, please read
-.
diff --git a/LICENSE-MIT b/LICENSE-MIT
new file mode 100644
index 0000000000..03125091b9
--- /dev/null
+++ b/LICENSE-MIT
@@ -0,0 +1,23 @@
+MIT License
+
+Copyright (c) the LightCraft contributors
+Copyright (c) the PhotoCraft contributors
+Copyright (c) the project contributors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/NOTICE b/NOTICE
index a8defc83f0..55a0f96f7e 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,7 +1,9 @@
-This software is dual-licensed (maintainer decision 2026-11-10): you may use it under the MIT
-License (LICENSE) or, at your option, the GNU General Public License version 3 or later
-(LICENSE-GPL-3.0.txt). crates/segment and crates/fetch additionally remain available under the
-Apache License 2.0 inherited from upstream (see LICENSE-APACHE in each of those crate folders).
+The lcc crates and this application are licensed under the GNU General Public License version 3 or
+later (LICENSE-GPL-3.0.txt) (maintainer decisions 2026-11-10 and 2026-11-30). Core code is GPL-only.
+Adopted code must be GPL-3.0-compatible or Apache-2.0; MIT is allowed only as a complete, isolated module/library
+or plugin. Adopted code keeps its original licence, as stated below (the MIT text is in LICENSE, Apache texts sit
+beside the relevant crates). Those crates also carry the original option: lcc-camprof is
+GPL-3.0-or-later OR MIT OR Apache-2.0; lcc-fetch, lcc-segment and lcc-tflite are GPL-3.0-or-later OR Apache-2.0.
Upstream attribution
@@ -139,8 +141,8 @@ crates/segment (lightcraft-segment) ports the SAM 3 model code of Hugging Face T
Copyright The HuggingFace Team and Meta Platforms, Inc., licensed under the Apache License 2.0.
The port was modified by the upstream contributors (2026): translated from Python/PyTorch to
Rust on candle and restructured; each ported file says so. Because of this, crates/segment is
-licensed under the Apache License 2.0 only (crates/segment/LICENSE-APACHE), not under MIT.
-crates/fetch is likewise licensed under the Apache License 2.0 only (crates/fetch/LICENSE-APACHE).
+licensed under GPL-3.0-or-later OR Apache-2.0 (crates/segment/LICENSE-APACHE), not under MIT.
+crates/fetch is likewise licensed under GPL-3.0-or-later OR Apache-2.0 (crates/fetch/LICENSE-APACHE).
The SAM 3 weights are not part of this software and are never distributed with it. A user downloads
the facebook/sam3 checkpoint only when they choose to (in the app, or by hand), under Meta's SAM
@@ -296,7 +298,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-crates/tflite (lcc-tflite, Apache License 2.0) — a TensorFlow Lite interpreter written by OneSlips
+crates/tflite (lcc-tflite; its TensorFlow-derived portions are Apache License 2.0) — a TensorFlow Lite interpreter written by OneSlips
in 2026 from the TensorFlow Lite model schema (schema.fbs: field order, enum values, option
defaults; Copyright The TensorFlow Authors, Apache License 2.0) and the documented behaviour of
its builtin operators; no TensorFlow code was copied. Its MediaPipe landmark index lists are data
@@ -306,7 +308,8 @@ from MediaPipe's face_landmarks_connections (Copyright 2023 The MediaPipe Author
crates/camprof (lcc-camprof) ports the camera-profiling engine of RADcamProfiles
(https://github.com/OneSlips/RADcamProfiles, commit dd8003f, crates/engine), Copyright (c) 2026 RAD Films -
Roman Alurkoff (@OneSlips), licensed under the MIT License and relicensed under the MIT License or the
-Apache License 2.0 by its author. It is clean-room, own work, confirmed by the author 2026-11-03: no DCamProf
+Apache License 2.0 by its author. It is distributed as part of the GPL-3.0-or-later work; those ported files
+remain available under MIT or Apache-2.0. It is clean-room, own work, confirmed by the author 2026-11-03: no DCamProf
or other GPL code was used, and its data is public or the author's own. The port was modified by the
Chromaforge contributors (2026); each ported file says so. It carries the CIE 1931 2-degree colour-matching
functions and the CIE standard illuminants A, D50, D55, D65, D75 and E (CIE 015:2018 / ISO/CIE 11664
diff --git a/PRIVACY.md b/PRIVACY.md
index 4be0247e8f..2006a5ec96 100644
--- a/PRIVACY.md
+++ b/PRIVACY.md
@@ -13,7 +13,7 @@ catalog, edits, keywords, faces and settings stay on your device. The developers
The app works offline. It only connects to the network for the features below. None of these requests carries
personal data beyond what any web request reveals to the server it goes to: your IP address, the time, and a
-User-Agent of the form `/`. No identifier for you or your device is sent.
+User-Agent of the form `chromaforge/`. No identifier for you or your device is sent.
| Feature | Server | What is sent | When | How to avoid it |
|---|---|---|---|---|
diff --git a/README.md b/README.md
index 1c73b9f657..b881e440c0 100644
--- a/README.md
+++ b/README.md
@@ -10,7 +10,7 @@
-
+
@@ -19,7 +19,7 @@
Download ·
Features ·
Install ·
- Manual ·
+ Manual ·
Roadmap ·
Licence
@@ -41,7 +41,7 @@ UI, the CLI, a control channel and an MCP server all share.
- **Local-first:** no account, no cloud, no telemetry, no subscription. The network is used only for things you turn on.
- **Non-destructive:** originals are never touched; edits live in the catalog and, if you like, in XMP sidecars.
- **Drivable end to end by AI agents** over MCP, with undo for everything they do.
-- **Open source** (MIT). Chromaforge is a fork of an open-source project; its copyright notices are kept in [NOTICE](NOTICE)
+- **Open source** (GPL-3.0-or-later). Chromaforge is a fork of an open-source project; its copyright notices are kept in [NOTICE](NOTICE)
and [LICENSE](LICENSE).
## Contents
@@ -49,8 +49,7 @@ UI, the CLI, a control channel and an MCP server all share.
- [Features](#features): [modules](#seven-modules-one-catalog) · [editing](#editing) · [masking](#masking) ·
[library & culling](#library-and-culling) · [video](#video) · [beyond the darkroom](#beyond-the-darkroom)
- [Install](#install) · [Keyboard](#keyboard) · [Licence and credits](#licence-and-credits)
-- [Manual](docs/manual/README.md): [building from source and contributing](docs/manual/build-and-contribute.md) ·
- [agents, MCP, performance and feature status](docs/manual/agents-and-status.md) ·
+- [Manual](https://emmertex.github.io/chromaforge/): [contributing](CONTRIBUTING.md) ·
[roadmap](ROADMAP.md)
# Features
@@ -147,7 +146,7 @@ Clips live in the same library as your photos. MP4, MOV, MKV, WebM, MPEG-TS and
ProRes, DNxHR, APV or MPEG-2 decode in pure Rust. Play a clip in the loupe (Space, ← /
→ for single frames), drag the trim handles, pick the poster frame the grid shows, and capture any frame as
a photo. The Light and Color controls (and presets that use only them) grade every frame. Export writes H.264 MP4 or
-ProRes MOV with the trim, the grade and the sound (graded on the GPU for H.264); ` render clip.mov -o out.mp4 --trim 2,8` does the same from
+ProRes MOV with the trim, the grade and the sound (graded on the GPU for H.264); `chromaforge-cli render clip.mov -o out.mp4 --trim 2,8` does the same from
the command line. Interlaced H.264 (AVCHD 1080i) is deinterlaced. Masks, spot removal, lens corrections and crop don't apply to video.
See [docs/video.md](docs/video.md).
@@ -171,19 +170,19 @@ See [docs/video.md](docs/video.md).
Not sure which file you need? The [Download page](https://emmertex.github.io/chromaforge/download/) picks the right
one for your computer. Release builds are listed on the project's releases page. `` in the file names is the version number,
-``/`` are the brand binary names, and `SHA256SUMS.txt` lists a checksum for every file. Build them yourself
+`chromaforge`/`chromaforge-cli` are the brand binary names, and `SHA256SUMS.txt` lists a checksum for every file. Build them yourself
with `cargo xtask package`.
### Windows
| Build | Installer | Portable |
|---|---|---|
-| x64 (64-bit Intel/AMD) | `--windows-x64.msi` | `--windows-x64-portable.zip` |
-| arm64 (Snapdragon and other ARM PCs) | `--windows-arm64.msi` | `--windows-arm64-portable.zip` |
+| x64 (64-bit Intel/AMD) | `chromaforge--windows-x64.msi` | `chromaforge--windows-x64-portable.zip` |
+| arm64 (Snapdragon and other ARM PCs) | `chromaforge--windows-arm64.msi` | `chromaforge--windows-arm64-portable.zip` |
-The installers and executables are not code-signed, so Windows SmartScreen may warn the first time you run them (More info ▸ Run anyway). The installer asks where to install (`C:\Program Files\` by
+The installers and executables are not code-signed, so Windows SmartScreen may warn the first time you run them (More info ▸ Run anyway). The installer asks where to install (`C:\Program Files\Chromaforge` by
default; upgrades stay in the folder you chose) and ends on a page confirming the app was installed, with an
-option to start it. For unattended installs: `msiexec /i --windows-x64.msi /qn INSTALLFOLDER="D:\Apps\\"`.
+option to start it. For unattended installs: `msiexec /i chromaforge--windows-x64.msi /qn INSTALLFOLDER="D:\Apps\Chromaforge\"`.
**Update or uninstall asks for an old `.msi`, or stops with error 1612 or 1714?** Windows removes the installed version
with its own cached copy of that version's installer; if the copy is gone, it asks for the original file and stops
@@ -197,19 +196,19 @@ message.
| Build | File | Notes |
|---|---|---|
-| App, Apple silicon | `--macos-arm64.dmg` | Not signed or notarized: macOS asks you to allow it on first open ([how](docs/manual/getting-started.md#install)) |
-| App, Intel | `--macos-x64.dmg` | As above |
-| Command-line tool | inside the app: `.app/Contents/MacOS/` | Updates with the app; to run it from Terminal, link it onto `PATH` ([how](docs/manual/getting-started.md#install)) |
+| App, Apple silicon | `chromaforge--macos-arm64.dmg` | Not signed or notarized: macOS asks you to allow it on first open ([how](https://emmertex.github.io/chromaforge/start/install/)) |
+| App, Intel | `chromaforge--macos-x64.dmg` | As above |
+| Command-line tool | inside the app: `Chromaforge.app/Contents/MacOS/chromaforge-cli` | Updates with the app; to run it from Terminal, link it onto `PATH` ([how](https://emmertex.github.io/chromaforge/start/install/)) |
### Linux
| Format | x86_64 | Notes |
|---|---|---|
-| AppImage | `--linux-x86_64.AppImage` | Runs anywhere; updates itself with [AppImageUpdate](https://github.com/AppImageCommunity/AppImageUpdate) (`.zsync` files) |
-| Flatpak | `--linux-x86_64.flatpak` | Sandboxed; `flatpak install --user ` |
-| Debian/Ubuntu | `--linux-x86_64.deb` | |
-| Fedora/RHEL/openSUSE | `--linux-x86_64.rpm` | |
-| Tarball | `--linux-x86_64.tar.gz` | Unpack anywhere |
+| AppImage | `chromaforge--linux-x86_64.AppImage` | Runs anywhere; updates itself with [AppImageUpdate](https://github.com/AppImageCommunity/AppImageUpdate) (`.zsync` files) |
+| Flatpak | `chromaforge--linux-x86_64.flatpak` | Sandboxed; `flatpak install --user ` |
+| Debian/Ubuntu | `chromaforge--linux-x86_64.deb` | |
+| Fedora/RHEL/openSUSE | `chromaforge--linux-x86_64.rpm` | |
+| Tarball | `chromaforge--linux-x86_64.tar.gz` | Unpack anywhere |
Linux ARM64 (aarch64) builds are paused; `packaging/linux/package.sh aarch64` still builds one locally.
@@ -246,9 +245,9 @@ Install from the release's APKs:
| Build | File | Notes |
|---|---|---|
-| Phones and tablets (arm64) | `--android-arm64-v8a.apk` | Sideload: allow installs from your browser or file manager, then open the file |
-| Emulator and Chromebooks (x86_64) | `--android-x86_64.apk` | |
-| Play Store bundle | `--android-arm64-v8a-x86_64.aab` | For Play Console uploads, not for installing |
+| Phones and tablets (arm64) | `chromaforge--android-arm64-v8a.apk` | Sideload: allow installs from your browser or file manager, then open the file |
+| Emulator and Chromebooks (x86_64) | `chromaforge--android-x86_64.apk` | |
+| Play Store bundle | `chromaforge--android-arm64-v8a-x86_64.aab` | For Play Console uploads, not for installing |
Android 9 or newer. Until a release signing key is set up, the APKs carry a test signature: they install, but a
build signed with the release key later will need the test build uninstalled first.
@@ -257,7 +256,7 @@ build signed with the release key later will need the test build uninstalled fir
| Build | File | Notes |
|---|---|---|
-| Static site | `-web-.zip` | Runs in a modern browser; host it on any static server |
+| Static site | `chromaforge-web-.zip` | Runs in a modern browser; host it on any static server |
## Keyboard
@@ -280,9 +279,12 @@ Settings → Shortcuts → Keymap switches to the *Alternative* set.
## Licence and credits
-The app is licensed under the [MIT License](LICENSE), except `crates/segment` and `crates/fetch`, which are
-Apache-2.0 only. It is a fork of an open-source project; that project's copyright notices and required
-third-party notices are in [LICENSE](LICENSE) and [NOTICE](NOTICE).
+The app and every `lcc-*` crate are licensed under the [GNU GPL v3 or later](LICENSE-GPL-3.0.txt).
+Code adopted from other sources must be GPL-3.0-compatible or Apache-2.0; MIT is allowed only as a complete,
+isolated module/library or plugin. Adopted code keeps its original licence (see [NOTICE](NOTICE)); the combined
+work is distributed under GPL-3.0-or-later. It is a fork of an
+open-source project; that project's copyright notices and required third-party notices are in
+[LICENSE](LICENSE) and [NOTICE](NOTICE).
Privacy: the app collects no data; see [PRIVACY.md](PRIVACY.md).
diff --git a/README.md.in b/README.md.in
index a28fdf2df8..225c0a4ed4 100644
--- a/README.md.in
+++ b/README.md.in
@@ -10,7 +10,7 @@
-
+
@@ -19,7 +19,7 @@
Download ·
Features ·
Install ·
- Manual ·
+ Manual ·
Roadmap ·
Licence
@@ -41,7 +41,7 @@ UI, the CLI, a control channel and an MCP server all share.
- **Local-first:** no account, no cloud, no telemetry, no subscription. The network is used only for things you turn on.
- **Non-destructive:** originals are never touched; edits live in the catalog and, if you like, in XMP sidecars.
- **Drivable end to end by AI agents** over MCP, with undo for everything they do.
-- **Open source** (MIT). Chromaforge is a fork of an open-source project; its copyright notices are kept in [NOTICE](NOTICE)
+- **Open source** (GPL-3.0-or-later). Chromaforge is a fork of an open-source project; its copyright notices are kept in [NOTICE](NOTICE)
and [LICENSE](LICENSE).
## Contents
@@ -49,8 +49,7 @@ UI, the CLI, a control channel and an MCP server all share.
- [Features](#features): [modules](#seven-modules-one-catalog) · [editing](#editing) · [masking](#masking) ·
[library & culling](#library-and-culling) · [video](#video) · [beyond the darkroom](#beyond-the-darkroom)
- [Install](#install) · [Keyboard](#keyboard) · [Licence and credits](#licence-and-credits)
-- [Manual](docs/manual/README.md): [building from source and contributing](docs/manual/build-and-contribute.md) ·
- [agents, MCP, performance and feature status](docs/manual/agents-and-status.md) ·
+- [Manual]({{website}}): [contributing](CONTRIBUTING.md) ·
[roadmap](ROADMAP.md)
# Features
@@ -147,7 +146,7 @@ Clips live in the same library as your photos. MP4, MOV, MKV, WebM, MPEG-TS and
ProRes, DNxHR, APV or MPEG-2 decode in pure Rust. Play a clip in the loupe (Space, ← /
→ for single frames), drag the trim handles, pick the poster frame the grid shows, and capture any frame as
a photo. The Light and Color controls (and presets that use only them) grade every frame. Export writes H.264 MP4 or
-ProRes MOV with the trim, the grade and the sound (graded on the GPU for H.264); ` render clip.mov -o out.mp4 --trim 2,8` does the same from
+ProRes MOV with the trim, the grade and the sound (graded on the GPU for H.264); `chromaforge-cli render clip.mov -o out.mp4 --trim 2,8` does the same from
the command line. Interlaced H.264 (AVCHD 1080i) is deinterlaced. Masks, spot removal, lens corrections and crop don't apply to video.
See [docs/video.md](docs/video.md).
@@ -171,19 +170,19 @@ See [docs/video.md](docs/video.md).
Not sure which file you need? The [Download page]({{website}}download/) picks the right
one for your computer. Release builds are listed on the project's releases page. `` in the file names is the version number,
-``/`` are the brand binary names, and `SHA256SUMS.txt` lists a checksum for every file. Build them yourself
+`chromaforge`/`chromaforge-cli` are the brand binary names, and `SHA256SUMS.txt` lists a checksum for every file. Build them yourself
with `cargo xtask package`.
### Windows
| Build | Installer | Portable |
|---|---|---|
-| x64 (64-bit Intel/AMD) | `--windows-x64.msi` | `--windows-x64-portable.zip` |
-| arm64 (Snapdragon and other ARM PCs) | `--windows-arm64.msi` | `--windows-arm64-portable.zip` |
+| x64 (64-bit Intel/AMD) | `chromaforge--windows-x64.msi` | `chromaforge--windows-x64-portable.zip` |
+| arm64 (Snapdragon and other ARM PCs) | `chromaforge--windows-arm64.msi` | `chromaforge--windows-arm64-portable.zip` |
-The installers and executables are not code-signed, so Windows SmartScreen may warn the first time you run them (More info ▸ Run anyway). The installer asks where to install (`C:\Program Files\` by
+The installers and executables are not code-signed, so Windows SmartScreen may warn the first time you run them (More info ▸ Run anyway). The installer asks where to install (`C:\Program Files\Chromaforge` by
default; upgrades stay in the folder you chose) and ends on a page confirming the app was installed, with an
-option to start it. For unattended installs: `msiexec /i --windows-x64.msi /qn INSTALLFOLDER="D:\Apps\\"`.
+option to start it. For unattended installs: `msiexec /i chromaforge--windows-x64.msi /qn INSTALLFOLDER="D:\Apps\Chromaforge\"`.
**Update or uninstall asks for an old `.msi`, or stops with error 1612 or 1714?** Windows removes the installed version
with its own cached copy of that version's installer; if the copy is gone, it asks for the original file and stops
@@ -197,19 +196,19 @@ message.
| Build | File | Notes |
|---|---|---|
-| App, Apple silicon | `--macos-arm64.dmg` | Not signed or notarized: macOS asks you to allow it on first open ([how](docs/manual/getting-started.md#install)) |
-| App, Intel | `--macos-x64.dmg` | As above |
-| Command-line tool | inside the app: `.app/Contents/MacOS/` | Updates with the app; to run it from Terminal, link it onto `PATH` ([how](docs/manual/getting-started.md#install)) |
+| App, Apple silicon | `chromaforge--macos-arm64.dmg` | Not signed or notarized: macOS asks you to allow it on first open ([how]({{website}}start/install/)) |
+| App, Intel | `chromaforge--macos-x64.dmg` | As above |
+| Command-line tool | inside the app: `Chromaforge.app/Contents/MacOS/chromaforge-cli` | Updates with the app; to run it from Terminal, link it onto `PATH` ([how]({{website}}start/install/)) |
### Linux
| Format | x86_64 | Notes |
|---|---|---|
-| AppImage | `--linux-x86_64.AppImage` | Runs anywhere; updates itself with [AppImageUpdate](https://github.com/AppImageCommunity/AppImageUpdate) (`.zsync` files) |
-| Flatpak | `--linux-x86_64.flatpak` | Sandboxed; `flatpak install --user ` |
-| Debian/Ubuntu | `--linux-x86_64.deb` | |
-| Fedora/RHEL/openSUSE | `--linux-x86_64.rpm` | |
-| Tarball | `--linux-x86_64.tar.gz` | Unpack anywhere |
+| AppImage | `chromaforge--linux-x86_64.AppImage` | Runs anywhere; updates itself with [AppImageUpdate](https://github.com/AppImageCommunity/AppImageUpdate) (`.zsync` files) |
+| Flatpak | `chromaforge--linux-x86_64.flatpak` | Sandboxed; `flatpak install --user ` |
+| Debian/Ubuntu | `chromaforge--linux-x86_64.deb` | |
+| Fedora/RHEL/openSUSE | `chromaforge--linux-x86_64.rpm` | |
+| Tarball | `chromaforge--linux-x86_64.tar.gz` | Unpack anywhere |
Linux ARM64 (aarch64) builds are paused; `packaging/linux/package.sh aarch64` still builds one locally.
@@ -246,9 +245,9 @@ Install from the release's APKs:
| Build | File | Notes |
|---|---|---|
-| Phones and tablets (arm64) | `--android-arm64-v8a.apk` | Sideload: allow installs from your browser or file manager, then open the file |
-| Emulator and Chromebooks (x86_64) | `--android-x86_64.apk` | |
-| Play Store bundle | `--android-arm64-v8a-x86_64.aab` | For Play Console uploads, not for installing |
+| Phones and tablets (arm64) | `chromaforge--android-arm64-v8a.apk` | Sideload: allow installs from your browser or file manager, then open the file |
+| Emulator and Chromebooks (x86_64) | `chromaforge--android-x86_64.apk` | |
+| Play Store bundle | `chromaforge--android-arm64-v8a-x86_64.aab` | For Play Console uploads, not for installing |
Android 9 or newer. Until a release signing key is set up, the APKs carry a test signature: they install, but a
build signed with the release key later will need the test build uninstalled first.
@@ -257,7 +256,7 @@ build signed with the release key later will need the test build uninstalled fir
| Build | File | Notes |
|---|---|---|
-| Static site | `-web-.zip` | Runs in a modern browser; host it on any static server |
+| Static site | `chromaforge-web-.zip` | Runs in a modern browser; host it on any static server |
## Keyboard
@@ -280,9 +279,12 @@ Settings → Shortcuts → Keymap switches to the *Alternative* set.
## Licence and credits
-The app is licensed under the [MIT License](LICENSE), except `crates/segment` and `crates/fetch`, which are
-Apache-2.0 only. It is a fork of an open-source project; that project's copyright notices and required
-third-party notices are in [LICENSE](LICENSE) and [NOTICE](NOTICE).
+The app and every `lcc-*` crate are licensed under the [GNU GPL v3 or later](LICENSE-GPL-3.0.txt).
+Code adopted from other sources must be GPL-3.0-compatible or Apache-2.0; MIT is allowed only as a complete,
+isolated module/library or plugin. Adopted code keeps its original licence (see [NOTICE](NOTICE)); the combined
+work is distributed under GPL-3.0-or-later. It is a fork of an
+open-source project; that project's copyright notices and required third-party notices are in
+[LICENSE](LICENSE) and [NOTICE](NOTICE).
Privacy: the app collects no data; see [PRIVACY.md](PRIVACY.md).
diff --git a/ROADMAP.md b/ROADMAP.md
index 67179f0d0f..41b68777c4 100644
--- a/ROADMAP.md
+++ b/ROADMAP.md
@@ -1,6 +1,6 @@
# Roadmap
-*Last updated 2026-11-28 (version 0.8.2). Revision history: [Log](#log).*
+*Last updated 2026-11-30 (version 0.8.2). Revision history: [Log](#log).*
Milestones toward full Adobe Lightroom Classic parity, with the Classic shell and output modules (Map, Book, Slideshow,
Print, Web, publish) and Immich integration as Chromaforge's own focus on top of the upstream engine. Estimates are for
@@ -213,13 +213,15 @@ X-Trans, 14/16-bit real-file verification), RW2 / Leica RWL / Panasonic RAW in e
packed formats 2, 5 and 7, the 16-bit words of the 2005–2007 bodies; all recovered by black-box analysis of 178 CC0 files from
118 bodies, `crates/raw/src/vendor/rw2.rs`), PEF (uncompressed and Huffman), ORF uncompressed (16-bit and 12-bit packed) and compressed (every Olympus / OM body since ~2008). Supported containers yield their embedded JPEG preview when present (including CR3). The engine uses it for RAW variants it cannot decode yet; HEVC-only CR3 previews are not decoded.
+FITS (astrophotography; beyond Lightroom's formats, issue #1604): `.fits`, `.fit` and `.fts` files from astro cameras and stacking software open as raw photos: 8-, 16- and 32-bit integer and 32- and 64-bit floating-point samples, a monochrome frame or a colour filter array (`BAYERPAT`, with `XBAYOFF` / `YBAYOFF`), or red, green and blue planes (`crates/raw/src/vendor/fits.rs`, headers by `crates/meta/src/fits.rs`). A FITS file states no white balance and no colour matrix: As Shot is D65 and colour is the neutral model, and white is the top of the sample type's range. Checked on synthetic files only (no CC0 sample on raw.pixls.us); 64-bit integers, data cubes, `ZIMAGE` tile compression and random-groups records are refused, saying why.
+
Not decoded yet — preview only (no permissively licensed description; black-box analysis incomplete):
- **Canon CR3 unverified CRX variants** (M11.1), **Canon sRAW/mRAW**.
**Camera colour matrices:** ARW, NEF, RW2, RAF, CR3, CR2, PEF, Samsung SRW and Olympus ORF files can use guarded, separate chromaticity and tone estimates from their own embedded JPEG (see `docs/camera-preview-colour.md`); this is a per-file camera-look estimate with relative WB, not measured calibration or absolute-Kelvin WB. 52 models whose fit is rejected (or that have no usable JPEG) start from matrices fitted to their measured spectral sensitivities instead (rawtoaces-data, Apache-2.0; `crates/raw/src/spectral.rs`). Other non-DNG raws and rejected fits use the documented neutral fallback (camera RGB ≈ linear sRGB, flagged
`matrix_is_fallback`) with the file's as-shot white-balance multipliers. Clean sources to evaluate next: manufacturer
matrices stored in the files themselves (Olympus ImageProcessing `ColorMatrix`, Pentax equivalents; Panasonic RW2 files carry none) and our
-own calibration (M11.4): ` calibrate-lightroom` fits a camera's colour model and looks black-box to Lightroom's exports of a contributor's own photos (maintainer decision 2026-10-25; [docs/calibrate-lightroom.md](docs/calibrate-lightroom.md)); no camera is calibrated yet. Adobe DCP/LCP files and matrices from Adobe-converted DNGs are never used.
+own calibration (M11.4): `chromaforge-cli calibrate-lightroom` fits a camera's colour model and looks black-box to Lightroom's exports of a contributor's own photos (maintainer decision 2026-10-25; [docs/calibrate-lightroom.md](docs/calibrate-lightroom.md)); no camera is calibrated yet. Adobe DCP/LCP files and matrices from Adobe-converted DNGs are never used.
## Lightroom Classic catalog migration
@@ -234,6 +236,8 @@ history/snapshots remain source data, and smart collections import current membe
database is read-only; the app owns subsequent edits. See `docs/lightroom-catalog-import.md`.
## Log
+- 2026-11-30: FITS, the format of astrophotography cameras and software, decodes (#1604; beyond the Lightroom target: no
+ row moves, the numbers are unchanged).
- 2026-11-25: adaptive presets (plan 7.8; LR-PRE-ADAPTIVE, LR-MASK-ADAPTIVE): 90.6% of 630 rows, P2 81.2%.
- 2026-11-25: plan 7.5 OpenEXR scene-linear export (gap 42 narrows; beyond the Lightroom target, numbers unchanged):
half / float, linear Rec. 2020 or ACEScg, primaries in the `chromaticities` attribute (`exr` crate, BSD-3-Clause).
@@ -261,7 +265,7 @@ database is read-only; the app owns subsequent edits. See `docs/lightroom-catalo
- 2026-11-24: M10: the Export screen previews the first photo to be exported as its file will be (the export's own rendering),
with an SDR / HDR choice: the HDR rendition on an HDR display, else the SDR rendition and the reason
(`export.previewMode`, LR-EXP-HDR).
-- 2026-10-25: M11.4: ` calibrate-lightroom` (preset, fit, add, list): camera calibrations matched to Lightroom
+- 2026-10-25: M11.4: `chromaforge-cli calibrate-lightroom` (preset, fit, add, list): camera calibrations matched to Lightroom
by black-box fits to its exports of contributors' own photos; data rules amended (gaps 1 and 3; 0 cameras so far).
- 2026-10-22 (upstream): Print page setup and PDF output gain the Japanese photo and postcard papers (L判, 2L判,
KG判, はがき, 往復はがき, 六切, 四切, 名刺) at their exact metric sizes, by their customary names in the Print dialog
diff --git a/apps/app/Cargo.toml b/apps/app/Cargo.toml
index 93a96481b9..3c36b5f3be 100644
--- a/apps/app/Cargo.toml
+++ b/apps/app/Cargo.toml
@@ -38,6 +38,8 @@ libraw = ["lcc-engine/libraw", "lcc-cli/libraw"]
# the command-line tool, run when the program is started as `` (`main`); its features follow
# the app's, so a build without HEIF leaves it out of the CLI too
lcc-cli = { path = "../cli", default-features = false }
+# photos macOS hands the app from Finder, the Dock or Open With (a no-op elsewhere)
+lcc-opendocs = { workspace = true }
# reading the Logi plugin package's version (`logi_plugin`) and the control-surface e2e test
lcc-surface = { workspace = true }
lcc-brand = { workspace = true }
diff --git a/apps/app/src/editors.rs b/apps/app/src/editors.rs
index 1438755d21..e12ab3568c 100644
--- a/apps/app/src/editors.rs
+++ b/apps/app/src/editors.rs
@@ -28,6 +28,19 @@ pub fn check(app: &str) -> Result<(), String> {
launcher(app).map(|_| ())
}
+/// The program `app` names, as a plain command line the engine's launcher can start (issue
+/// #1315): PhotoCraft found where its installer put it, a named program as it is, a macOS
+/// application name kept for `open -a` (which takes the arguments with it). `None` = not a plain
+/// program for this host: the system default, the Flatpak (the host opener forwards its files) or
+/// PhotoCraft, which isn't there — [`open_with`] reports that.
+pub fn resolve(app: &str) -> Option {
+ match launcher(app) {
+ Ok(Launcher::Program(p)) => Some(p.to_string_lossy().to_string()),
+ Ok(Launcher::MacApp(n)) => Some(n),
+ _ => None,
+ }
+}
+
/// Open `path` in `app` (see [`check`]). Spawned, never waited for: the editor runs alongside.
pub fn open_with(path: &str, app: &str) -> Result<(), String> {
let mut c = match launcher(app)? {
@@ -332,6 +345,169 @@ fn mdfind_app(output: &str) -> Option {
output.lines().map(str::trim).find(|l| l.ends_with(".app")).map(PathBuf::from)
}
+// --------------------------------------------------------------------------------------------- detected editors
+
+/// How an application's name says it edits photos. A hint only: the combo's Browse… picks any
+/// program, and a program the list misses still works once it is named.
+const EDITOR_WORDS: &[&str] = &[
+ "photoshop",
+ "affinity",
+ "gimp",
+ "darktable",
+ "rawtherapee",
+ "ansel",
+ "photoflare",
+ "pinta",
+ "krita",
+ "digikam",
+ "pixelmator",
+ "acorn",
+ "corel",
+ "paintshop",
+ "paint",
+ "aftershot",
+ "dxo",
+ "photolab",
+ "pureraw",
+ "capture one",
+ "captureone",
+ "lightroom",
+ "luminar",
+ "topaz",
+ "photoline",
+ "zoner",
+ "helicon",
+ "luminance",
+ "ramka",
+ "foto",
+ "image",
+ "picture",
+ "photo",
+];
+
+/// Whether an application's name (or its desktop entry's types) says it edits photos.
+fn name_says_editor(name: &str, mime_types: &str) -> bool {
+ let lower = name.to_lowercase();
+ if mime_types.split([';', ',']).any(|m| m.trim().to_lowercase().starts_with("image/")) {
+ return true;
+ }
+ EDITOR_WORDS.iter().any(|w| lower.contains(w))
+}
+
+/// The photo editors installed on this machine, for Settings ▸ External Editing's Application
+/// combo: the desktop entries that open images (Linux), the registry's App Paths entries and the
+/// usual names on the PATH (Windows), the application folders by name (macOS). Sorted by name,
+/// one entry per application, deduplicated by how the app would start.
+pub fn detect_editors() -> Vec {
+ let mut out = detect_for_this_os();
+ out.sort_by(|a, b| a.name.to_lowercase().cmp(&b.name.to_lowercase()).then(a.app.cmp(&b.app)));
+ out.dedup_by(|a, b| a.app == b.app);
+ out
+}
+
+#[cfg(target_os = "macos")]
+fn detect_for_this_os() -> Vec {
+ let mut out = Vec::new();
+ for dir in ["/Applications", &format!("{}/Applications", std::env::var("HOME").unwrap_or_default())] {
+ let Ok(rd) = std::fs::read_dir(dir) else { continue };
+ for e in rd.flatten() {
+ let path = e.path();
+ let Some(stem) = path.file_stem() else { continue };
+ let name = stem.to_string_lossy().to_string();
+ if path.extension().is_some_and(|x| x == "app") && name_says_editor(&name, "") {
+ out.push(lcc_ui_egui::DetectedEditor { name: name.clone(), app: name });
+ }
+ }
+ }
+ out
+}
+
+#[cfg(windows)]
+fn detect_for_this_os() -> Vec {
+ let mut out = Vec::new();
+ for hive in [r"HKLM\Software\Microsoft\Windows\CurrentVersion\App Paths", r"HKCU\Software\Microsoft\Windows\CurrentVersion\App Paths"] {
+ for key in reg_subkeys(hive) {
+ let Some(name) = key.rsplit(['\\']).next().map(|n| n.trim_end_matches(".exe").to_string()) else { continue };
+ if !name_says_editor(&name, "") {
+ continue;
+ }
+ if let Some(path) = reg_query(&key, None) {
+ out.push(lcc_ui_egui::DetectedEditor { name, app: path });
+ }
+ }
+ }
+ let path_dirs: Vec = std::env::var_os("PATH").map(|p| std::env::split_paths(&p).collect()).unwrap_or_default();
+ for name in ["gimp", "darktable", "RawTherapee", "ansel", "photoflare", "krita"] {
+ if let Some(p) = resolve_program(Path::new(name), &path_dirs) {
+ out.push(lcc_ui_egui::DetectedEditor { name: capitalize(name), app: p.to_string_lossy().to_string() });
+ }
+ }
+ out
+}
+
+#[cfg(not(any(target_os = "macos", windows)))]
+fn detect_for_this_os() -> Vec {
+ let mut out = Vec::new();
+ let env = |k: &str| std::env::var_os(k).map(|v| v.to_string_lossy().to_string());
+ let path_dirs: Vec = env("PATH").map(|p| std::env::split_paths(&p).collect()).unwrap_or_default();
+ let mut seen = std::collections::HashSet::new();
+ for dir in desktop_entry_dirs(env) {
+ let Ok(rd) = std::fs::read_dir(dir) else { continue };
+ for e in rd.flatten().take(2048) {
+ let Some((name, program, mime)) = desktop_entry_info(&e.path()) else { continue };
+ if !name_says_editor(&name, &mime) {
+ continue;
+ }
+ // a wrapper (`Exec=env VAR=1 /opt/ed/ed %F`) can't be started with the photo alone
+ let Some(app) = resolve_program(&program, &path_dirs) else { continue };
+ if seen.insert(app.to_string_lossy().to_string()) {
+ out.push(lcc_ui_egui::DetectedEditor { name, app: app.to_string_lossy().to_string() });
+ }
+ }
+ }
+ out
+}
+
+/// A desktop entry's `Name=`, the program its `Exec=` starts, and its `MimeType=` types.
+#[cfg(not(any(target_os = "macos", windows)))]
+fn desktop_entry_info(path: &Path) -> Option<(String, PathBuf, String)> {
+ let text = std::fs::read_to_string(path).ok()?;
+ if !text.lines().any(|l| l.trim() == "[Desktop Entry]" || l.trim() == "[Desktop Action]") {
+ return None;
+ }
+ let field = |prefix: &str| text.lines().find_map(|l| l.strip_prefix(prefix).map(|v| v.trim().to_string()));
+ let name = field("Name=")?;
+ let exec = field("Exec=")?;
+ let mime = field("MimeType=").unwrap_or_default();
+ let program = desktop_exec(&exec)?;
+ Some((name, program, mime))
+}
+
+/// A Windows registry key's subkeys (`reg query ` lists them one per line).
+#[cfg(windows)]
+fn reg_subkeys(key: &str) -> Vec {
+ let mut c = Command::new("reg");
+ c.args(["query", key]);
+ #[cfg(windows)]
+ {
+ use std::os::windows::process::CommandExt;
+ const CREATE_NO_WINDOW: u32 = 0x0800_0000;
+ c.creation_flags(CREATE_NO_WINDOW);
+ }
+ let Some(out) = c.output().ok().filter(|o| o.status.success()) else { return Vec::new() };
+ String::from_utf8_lossy(&out.stdout).lines().map(str::trim).filter(|l| l.starts_with("HKEY_")).map(str::to_string).collect()
+}
+
+/// `Gimp` from `gimp` (the PATH fallbacks' display name).
+#[cfg(windows)]
+fn capitalize(name: &str) -> String {
+ let mut c = name.chars();
+ match c.next() {
+ Some(f) => f.to_uppercase().collect::() + c.as_str(),
+ None => String::new(),
+ }
+}
+
#[cfg(test)]
mod tests {
use super::*;
@@ -494,4 +670,23 @@ mod tests {
assert_eq!(named, Launcher::Program("/usr/bin/gimp".into()));
}
}
+
+ /// A named program resolves to what a plain command line starts (issue #1315): the program
+ /// itself, a macOS application name for `open -a`; the system default and the Flatpak are
+ /// None (the host opener starts those), and PhotoCraft resolves only when it is installed.
+ #[test]
+ fn resolve_names_a_startable_command() {
+ assert_eq!(resolve(""), None);
+ let gimp = resolve("/usr/bin/gimp");
+ if cfg!(target_os = "macos") {
+ assert_eq!(gimp.as_deref(), Some("/usr/bin/gimp"), "open -a takes the path");
+ } else {
+ assert_eq!(gimp.as_deref(), Some("/usr/bin/gimp"));
+ }
+ // PhotoCraft is found where its installer put it, or not at all; either way it never
+ // resolves to the bare name that a PATH-less start would need to find itself
+ if let Some(found) = resolve("photocraft") {
+ assert!(found != "photocraft", "{found}");
+ }
+ }
}
diff --git a/apps/app/src/main.rs b/apps/app/src/main.rs
index 40f908aafd..6c4e9778b2 100644
--- a/apps/app/src/main.rs
+++ b/apps/app/src/main.rs
@@ -42,6 +42,7 @@ mod midi;
mod native_dialog;
#[cfg(target_os = "macos")]
mod native_menu;
+mod reveal;
#[cfg(any(target_os = "linux", windows))]
mod screen_icc;
#[cfg(target_os = "macos")]
@@ -169,6 +170,8 @@ impl eframe::App for App {
}
fn raw_input_hook(&mut self, _ctx: &egui::Context, raw: &mut egui::RawInput) {
self.0.raw_input_hook(raw);
+ // after the hook, which replaces `dropped_files` with the control channel's drops
+ raw.dropped_files.extend(opened_as_dropped(lcc_opendocs::take()));
}
fn ui(&mut self, ui: &mut egui::Ui, frame: &mut eframe::Frame) {
self.0.perf.host_frame_ms = frame.info().cpu_usage.map(|s| f64::from(s) * 1000.0);
@@ -798,6 +801,15 @@ fn services(cc: &eframe::CreationContext<'_>, log_file: Option<&std::path::Path>
open_all_with: Some(Box::new(editors::open_all_with)),
open_preset: Some(Box::new(editors::open_preset)),
check_editor: Some(Box::new(editors::check)),
+ pick_executable: picker!(|| {
+ file_dialog()
+ .set_title(lcc_ui_egui::i18n::tr("Choose the Editor's Program"))
+ .pick_file()
+ .map(|p| vec![p.to_string_lossy().to_string()])
+ .unwrap_or_default()
+ }),
+ detect_editors: Some(Box::new(editors::detect_editors)),
+ resolve_editor: Some(Box::new(editors::resolve)),
storage_access: None,
camera_roll: None,
save_to_gallery: None,
@@ -807,6 +819,10 @@ fn services(cc: &eframe::CreationContext<'_>, log_file: Option<&std::path::Path>
launch(open_url_command(url))
})),
reveal: Some(Box::new(|path: &str| {
+ // Linux/BSD: select the file in the file manager, never waiting for it (upstream #4653)
+ if cfg!(any(target_os = "linux", target_os = "freebsd")) {
+ return reveal::reveal_one(path);
+ }
let status = if cfg!(target_os = "macos") {
std::process::Command::new("open").args(["-R", path]).status()
} else if cfg!(target_os = "windows") {
@@ -819,6 +835,11 @@ fn services(cc: &eframe::CreationContext<'_>, log_file: Option<&std::path::Path>
.map_err(|e| e.to_string())
.and_then(|s| if s.success() || cfg!(target_os = "windows") { Ok(()) } else { Err(format!("reveal failed: {s}")) })
})),
+ reveal_many: if cfg!(any(target_os = "linux", target_os = "freebsd")) {
+ Some(Box::new(|paths: &[String]| reveal::reveal_files(paths)))
+ } else {
+ None
+ },
pick_files: picker!(|| {
file_dialog()
.add_filter_nocase(lcc_ui_egui::i18n::tr("Photos"), lcc_engine::import::EXTENSIONS)
@@ -1247,6 +1268,25 @@ fn launch_imports(args: &[String]) -> LaunchArgs {
launch_imports_in(args, cwd.as_deref(), home.as_deref())
}
+/// A file the system asked the app to open (`lcc_opendocs`; macOS: Finder, the Dock, Open With),
+/// handed to the UI as a file dropped on the window: imported like a drop, or held while no library
+/// is open yet (`library_problem::hold_dropped`). Adapted from upstream #1204.
+#[derive(Debug)]
+struct OpenedFile(std::path::PathBuf);
+
+impl egui::DroppedFile for OpenedFile {
+ fn path(&self) -> &std::path::Path {
+ &self.0
+ }
+ fn bytes(&self) -> Result, String> {
+ std::fs::read(&self.0).map_err(|e| e.to_string())
+ }
+}
+
+fn opened_as_dropped(paths: Vec) -> impl Iterator- {
+ paths.into_iter().map(|p| std::sync::Arc::new(OpenedFile(p.into())) as egui::DroppedFileHandle)
+}
+
/// What the launch arguments ask for: files and folders to import, a library to open (a library's `catalog.snap`
/// or folder, double-clicked in the file manager), and a notice for each argument
/// left alone.
@@ -1341,8 +1381,9 @@ fn panic_log_path(args: impl IntoIterator
- ) -> Option<
/// skipped, as the parser takes them.
/// Whether the window looks for a newer release at start: only a session that keeps its settings, and not when
/// `--no-update-check` was given (Settings > General still decides within that).
+/// `_DISABLE_UPDATES` (a distro package) turns it off too (adapted from upstream #4663).
fn startup_update_check(keeps_settings: bool, no_update_check: bool) -> bool {
- keeps_settings && !no_update_check
+ keeps_settings && !no_update_check && !lcc_engine::update::disabled_by_env()
}
fn in_memory_session(args: impl IntoIterator
- ) -> bool {
@@ -1646,11 +1687,17 @@ fn run() -> eframe::Result {
b.with_x11();
}));
}
+ // macOS hands photos opened from Finder, the Dock or Open With to the running app, not as
+ // arguments; installed before the event loop exists, so the ones it was launched with arrive too
+ lcc_opendocs::install();
let started = std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| {
eframe::run_native(
lcc_brand::DISPLAY_NAME,
options,
Box::new(move |cc| {
+ // opened files that arrive from now on wake the window, which takes them as drops
+ let opened_ctx = cc.egui_ctx.clone();
+ lcc_opendocs::set_waker(move || opened_ctx.request_repaint());
// the window's renderer is up (eframe calls this after creating it)
win_files_app.started(window_renderer);
came_up_app.store(true, std::sync::atomic::Ordering::Relaxed);
@@ -1867,7 +1914,7 @@ fn run() -> eframe::Result {
let started = started.unwrap_or_else(|_| Err(eframe::Error::AppCreation("the window's renderer panicked while starting".into())));
if let Err(e) = &started {
// the renderer never came up: start again, which tries the next one in the chain
- if window_gpu::relaunch_after_failure(&win_files) {
+ if window_gpu::relaunch_after_failure(&win_files, lcc_opendocs::take()) {
log::error!("{} could not open its window with {}: {e}; trying the next renderer", lcc_brand::DISPLAY_NAME, window_renderer.name());
return Ok(());
}
@@ -1927,6 +1974,16 @@ fn startup_failed(error: &str, log_file: Option<&std::path::Path>) {
mod tests {
use super::*;
+ /// Files the system asks the app to open (macOS, `lcc_opendocs`) reach the UI as dropped files,
+ /// path for path and in order.
+ #[test]
+ fn opened_files_are_handed_over_as_drops() {
+ let dropped: Vec<_> = opened_as_dropped(vec!["/tmp/a b.arw".into(), "/tmp/c.heic".into()]).collect();
+ let paths: Vec<_> = dropped.iter().map(|f| f.path().to_path_buf()).collect();
+ assert_eq!(paths, [std::path::PathBuf::from("/tmp/a b.arw"), std::path::PathBuf::from("/tmp/c.heic")]);
+ assert_eq!(opened_as_dropped(Vec::new()).count(), 0);
+ }
+
fn os(args: &[&str]) -> Vec {
args.iter().map(std::ffi::OsString::from).collect()
}
@@ -2694,7 +2751,7 @@ mod config_path_tests {
/// that keeps its settings looks.
#[test]
fn no_update_check_flag_disables_the_startup_check() {
- assert!(startup_update_check(true, false));
+ assert_eq!(startup_update_check(true, false), !lcc_engine::update::disabled_by_env());
assert!(!startup_update_check(true, true));
assert!(!startup_update_check(false, false));
}
diff --git a/apps/app/src/reveal.rs b/apps/app/src/reveal.rs
new file mode 100644
index 0000000000..b9246f14b2
--- /dev/null
+++ b/apps/app/src/reveal.rs
@@ -0,0 +1,100 @@
+//! Revealing photos in the Linux/BSD file manager. Adapted from upstream #4653 (issues #4652,
+//! #4658 there): a file is selected through `org.freedesktop.FileManager1.ShowItems` over D-Bus
+//! (several files in one window), and only where that service is missing does the parent folder
+//! open with `xdg-open`, which is spawned without waiting so the app never freezes until the file
+//! manager window closes.
+
+/// `file://` URI for `ShowItems`: every byte outside the unreserved set (and `/`) is
+/// percent-encoded, so spaces and non-ASCII names survive the D-Bus call.
+pub(crate) fn file_uri(path: &str) -> String {
+ const HEX: &[u8; 16] = b"0123456789ABCDEF";
+ let mut out = String::with_capacity(path.len().saturating_add(7));
+ out.push_str("file://");
+ for &byte in path.as_bytes() {
+ match byte {
+ b'A'..=b'Z' | b'a'..=b'z' | b'0'..=b'9' | b'-' | b'_' | b'.' | b'~' | b'/' => out.push(char::from(byte)),
+ _ => {
+ out.push('%');
+ out.push(HEX.get(usize::from(byte >> 4)).map_or('0', |&c| char::from(c)));
+ out.push(HEX.get(usize::from(byte & 0xF)).map_or('0', |&c| char::from(c)));
+ }
+ }
+ }
+ out
+}
+
+/// `ShowItems` on the running file manager (Linux: `zbus` is a Linux dependency). Managers
+/// without `FileManager1` answer with an error and the caller falls back to `xdg-open`.
+#[cfg(target_os = "linux")]
+fn show_items(uris: &[String]) -> Result<(), String> {
+ let connection = zbus::blocking::connection::Builder::session()
+ .map_err(|e| e.to_string())?
+ .method_timeout(std::time::Duration::from_secs(2))
+ .build()
+ .map_err(|e| e.to_string())?;
+ let proxy =
+ zbus::blocking::Proxy::new(&connection, "org.freedesktop.FileManager1", "/org/freedesktop/FileManager1", "org.freedesktop.FileManager1")
+ .map_err(|e| e.to_string())?;
+ let startup_id = "";
+ proxy.call::<_, _, ()>("ShowItems", &(uris, startup_id)).map_err(|e| e.to_string())
+}
+
+#[cfg(not(target_os = "linux"))]
+fn show_items(_: &[String]) -> Result<(), String> {
+ Err("no FileManager1 on this system".into())
+}
+
+/// Opens `dir` with `xdg-open` without waiting for it; the child is reaped on a thread so no
+/// zombie is left behind.
+fn xdg_open_dir(dir: &str) -> Result<(), String> {
+ let mut child = std::process::Command::new("xdg-open").arg(dir).spawn().map_err(|e| format!("xdg-open: {e}"))?;
+ std::thread::spawn(move || {
+ let _ = child.wait();
+ });
+ Ok(())
+}
+
+/// Reveals one path: a folder opens, a file is selected in its folder, falling back to opening
+/// the folder.
+pub(crate) fn reveal_one(path: &str) -> Result<(), String> {
+ let p = std::path::Path::new(path);
+ if p.is_dir() {
+ return xdg_open_dir(path);
+ }
+ if show_items(std::slice::from_ref(&file_uri(path))).is_ok() {
+ return Ok(());
+ }
+ let dir = p.parent().map(|d| d.to_string_lossy().to_string()).filter(|d| !d.is_empty()).unwrap_or_else(|| ".".into());
+ xdg_open_dir(&dir)
+}
+
+/// Reveals several files: one `ShowItems` call selects them all in one window; without the
+/// service, the first file's folder opens, as a single reveal does.
+pub(crate) fn reveal_files(paths: &[String]) -> Result<(), String> {
+ let Some(first) = paths.first() else { return Err("no photo selected".into()) };
+ if paths.len() > 1 {
+ let uris: Vec = paths.iter().map(|path| file_uri(path)).collect();
+ if show_items(&uris).is_ok() {
+ return Ok(());
+ }
+ }
+ reveal_one(first)
+}
+
+#[cfg(test)]
+mod tests {
+ use super::*;
+
+ #[test]
+ fn file_uris_encode_for_show_items() {
+ assert_eq!(file_uri("/photos/IMG_0001.CR3"), "file:///photos/IMG_0001.CR3");
+ assert_eq!(file_uri("/home/Me/My Photos/IMG 1.jpg"), "file:///home/Me/My%20Photos/IMG%201.jpg");
+ assert_eq!(file_uri("/photos/café-étude.jpg"), "file:///photos/caf%C3%A9-%C3%A9tude.jpg");
+ assert_eq!(file_uri("/photos/a#b%c.jpg"), "file:///photos/a%23b%25c.jpg");
+ }
+
+ #[test]
+ fn revealing_nothing_is_an_error() {
+ assert!(reveal_files(&[]).is_err());
+ }
+}
diff --git a/apps/app/src/window_gpu.rs b/apps/app/src/window_gpu.rs
index f7039a4a0e..b4637eb19f 100644
--- a/apps/app/src/window_gpu.rs
+++ b/apps/app/src/window_gpu.rs
@@ -464,7 +464,7 @@ pub fn check_pipeline(device: &wgpu::Device, build: impl FnOnce(&wgpu::Device))
/// The start failed (error or panic) before the window's renderer came up: start the app again,
/// which then tries the next renderer. `false`: not relaunched (it came up, nothing written to
/// disk, or the retries are used up).
-pub fn relaunch_after_failure(files: &Files) -> bool {
+pub fn relaunch_after_failure(files: &Files, opened: Vec) -> bool {
if !files.armed() {
return false;
}
@@ -479,6 +479,8 @@ pub fn relaunch_after_failure(files: &Files) -> bool {
log::warn!("window: the renderer failed to start; starting again with the next one");
std::process::Command::new(exe)
.args(std::env::args_os().skip(1))
+ // files the system handed this launch (macOS: opened from Finder), so the next one imports them
+ .args(opened)
.env(lcc_brand::env_var(RETRY_VAR), (tries + 1).to_string())
.spawn()
.map_err(|e| log::error!("window: could not start again: {e}"))
@@ -543,7 +545,7 @@ mod tests {
// nothing written without a settings folder
let none = Files::new(None);
none.arm(dx);
- assert!(!none.armed() && !relaunch_after_failure(&none));
+ assert!(!none.armed() && !relaunch_after_failure(&none, Vec::new()));
let _ = std::fs::remove_dir_all(&d);
}
@@ -633,7 +635,7 @@ mod tests {
let f = Files::new(Some(d.clone()));
assert_eq!(f.take_failed(), None);
f.arm(WindowRenderer::Glow);
- assert!(!f.armed() && !relaunch_after_failure(&f));
+ assert!(!f.armed() && !relaunch_after_failure(&f, Vec::new()));
let _ = std::fs::remove_dir_all(&d);
}
diff --git a/apps/cli/src/calibrate_lightroom.rs b/apps/cli/src/calibrate_lightroom.rs
index 41abb6967d..6a0a6ede54 100644
--- a/apps/cli/src/calibrate_lightroom.rs
+++ b/apps/cli/src/calibrate_lightroom.rs
@@ -180,6 +180,9 @@ fn probe_check_cmd(args: &[String]) -> Result<(), String> {
let (Some(probes), Some(exports)) = (probes, exports) else {
return Err("probe-check needs --probes DIR (from `probe`) and --exports DIR (Lightroom's exports of them)".into());
};
+ // the app's side of the comparison is its default render, so the camera's calibration and the
+ // installed profiles apply as they do in a render (they are installed by a session, and none is made here)
+ lcc_engine::camera_profiles::install_dcps();
let report = lcc_colourfit::probe::check(&probes, &exports).map_err(|e| e.to_string())?;
if let Some(path) = &out {
let text = serde_json::to_string_pretty(&report).map_err(|e| e.to_string())?;
diff --git a/apps/cli/src/lib.rs b/apps/cli/src/lib.rs
index 848f1d6c02..6ac35db23c 100644
--- a/apps/cli/src/lib.rs
+++ b/apps/cli/src/lib.rs
@@ -644,8 +644,15 @@ fn mcp(args: &[String]) -> Result<(), String> {
};
if !files.is_empty() {
let paths = expand_paths(&files);
- let r = h.session.execute("library.import", &json!({"paths": paths})).map_err(|e| e.to_string())?;
- eprintln!("{CLI} mcp: imported {} photo(s)", r.get("imported").and_then(Value::as_array).map_or(0, Vec::len));
+ // A folder with no photos yet still serves (photos come later through `import`);
+ // `library.import` refuses an empty list, which would end the server before it starts
+ // (adapted from upstream #4538).
+ if paths.is_empty() {
+ eprintln!("{CLI} mcp: no photos found in {}; nothing imported", files.join(", "));
+ } else {
+ let r = h.session.execute("library.import", &json!({"paths": paths})).map_err(|e| e.to_string())?;
+ eprintln!("{CLI} mcp: imported {} photo(s)", r.get("imported").and_then(Value::as_array).map_or(0, Vec::len));
+ }
}
Box::new(h)
}
diff --git a/apps/cli/tests/mcp_empty_folder.rs b/apps/cli/tests/mcp_empty_folder.rs
new file mode 100644
index 0000000000..ebfe31c9db
--- /dev/null
+++ b/apps/cli/tests/mcp_empty_folder.rs
@@ -0,0 +1,29 @@
+//! ` mcp FOLDER` serves even when the folder holds no photos yet (adapted from upstream #4538).
+
+use std::io::Write;
+use std::process::{Command, Stdio};
+
+#[test]
+fn empty_folder_still_serves() {
+ let dir = std::env::temp_dir().join(format!("lcc-cli-test-{}", std::process::id())).join("mcp-empty-folder");
+ let _ = std::fs::remove_dir_all(&dir);
+ std::fs::create_dir_all(&dir).unwrap();
+ let mut child = Command::new(env!("CARGO_BIN_EXE_app-cli"))
+ .arg("mcp")
+ .arg(&dir)
+ .stdin(Stdio::piped())
+ .stdout(Stdio::piped())
+ .stderr(Stdio::piped())
+ .spawn()
+ .unwrap();
+ let mut input = child.stdin.take().unwrap();
+ input.write_all(b"{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"initialize\",\"params\":{\"protocolVersion\":\"2025-06-18\",\"capabilities\":{},\"clientInfo\":{\"name\":\"test\",\"version\":\"1\"}}}\n").unwrap();
+ drop(input);
+ let out = child.wait_with_output().unwrap();
+ let stdout = String::from_utf8_lossy(&out.stdout);
+ let stderr = String::from_utf8_lossy(&out.stderr);
+ let _ = std::fs::remove_dir_all(&dir);
+ assert!(out.status.success(), "an empty folder must not stop the server: {stderr}");
+ assert!(stderr.contains("serving MCP on stdio"), "CLI must reach the MCP transport: {stderr}");
+ assert!(stdout.contains("\"id\":1") && stdout.contains("\"result\""), "initialize must be answered: {stdout}");
+}
diff --git a/apps/web/src/web.rs b/apps/web/src/web.rs
index 334937eff7..9c222dc33d 100644
--- a/apps/web/src/web.rs
+++ b/apps/web/src/web.rs
@@ -243,11 +243,15 @@ fn services(originals: Originals, backend: Option, files: Files, frozen
lcc_codecs::encode_png(&lcc_codecs::EncodeImage::rgba8(img), &lcc_codecs::EncodeMeta::default()).unwrap_or_default()
})),
reveal: None,
+ reveal_many: None,
log_file: None,
open_with: None,
open_all_with: None,
open_preset: None,
check_editor: None,
+ pick_executable: None,
+ detect_editors: None,
+ resolve_editor: None,
storage_access: None,
camera_roll: None,
save_to_gallery: None,
diff --git a/assets/ATTRIBUTION.md b/assets/ATTRIBUTION.md
index 25da4c19b9..f074444b6b 100644
--- a/assets/ATTRIBUTION.md
+++ b/assets/ATTRIBUTION.md
@@ -14,42 +14,42 @@ covers a whole directory), or if a licence file referenced in the Licence column
| `assets/camera-profiles/*.json` | Camera colour profiles (matrix + hue/saturation/value table), built into LightCraft | ILCE-7M4: Harald Hoyer | original work: fitted by `lightcraft-cli calibrate` to the contributor's own raw photos and their in-camera JPEGs (597 ILCE-7M4 photos, 2026); aggregate colour statistics only, no image content; no Adobe or third-party profile data | MIT OR Apache-2.0 | 2026-10-07 | none |
| `packaging/macos/dmg/` (`background.svg`, the `background.tiff` rendered from it by `generate.py`, and the `dmg-layout.DS_Store` layout file) | macOS DMG window background | @XusBadia | original work for this repository; embeds the app icon (`brand/icon.svg`, referenced via ``, not copied); text is outlined Inter / JetBrains Mono glyph paths | MIT OR Apache-2.0 | 2026-10-08 | none (original); used for the Finder window of the macOS DMG, `packaging/macos/dmg/generate.py` renders it to `background.tiff` |
| `assets/camera-profiles/ILCA-99M2.json` | Sony ILCA-99M2 camera colour profile (matrix + hue/saturation/value table), built into LightCraft | LightCraft contributors; source photographs supplied by @PiMinusMax | original work: fitted by `lightcraft-cli calibrate` to 144 usable ILCA-99M2 ARWs (of 150, seven shooting days, Standard creative style) and their in-camera JPEGs; aggregate colour statistics only, no image content; no Adobe or third-party profile data | MIT OR Apache-2.0 | 2026-10-11 | none |
-| `assets/camera-profiles/ILCE-7CR.json` | Sony ILCE-7CR camera colour profile (matrix + hue/saturation/value table), built into the app | upstream contributors; source photographs supplied by @AlexChambers | original work: fitted by ` calibrate` to 125 usable ILCE-7CR ARWs (of 131, September 2025 to September 2026, Standard creative style) and their in-camera JPEGs; aggregate colour statistics only, no image content; no Adobe or third-party profile data | MIT OR Apache-2.0 | 2026-10-09 | none |
+| `assets/camera-profiles/ILCE-7CR.json` | Sony ILCE-7CR camera colour profile (matrix + hue/saturation/value table), built into the app | upstream contributors; source photographs supplied by @AlexChambers | original work: fitted by `chromaforge-cli calibrate` to 125 usable ILCE-7CR ARWs (of 131, September 2025 to September 2026, Standard creative style) and their in-camera JPEGs; aggregate colour statistics only, no image content; no Adobe or third-party profile data | MIT OR Apache-2.0 | 2026-10-09 | none |
| `assets/camera-profiles/X-H2S.json`, `assets/camera-profiles/X-T4.json` | Fujifilm camera colour profiles (matrix + hue/saturation/value table), built into LightCraft | LightCraft contributors; source photographs supplied by Sebastian Pfluegelmeier | original work: fitted by `lightcraft-cli calibrate` to 201 X-H2S and 545 X-T4 RAFs and their in-camera JPEGs; aggregate colour statistics only, no image content; no Adobe or third-party profile data | MIT OR Apache-2.0 | 2026-10-08 | none |
| `assets/camera-profiles/NIKON_Z_6_2.json` | Nikon Z 6II camera colour profile (matrix + hue/saturation/value table), built into LightCraft | Michael Anderson (@endthestart) | original work: fitted by `lightcraft-cli calibrate` to 296 usable Z 6II NEFs of my own (of 299, 2024 to 2026, Standard and Auto picture controls; NIKKOR Z 20mm f/1.8 S, Z 24-70mm f/4 S and AF-S 70-200mm f/2.8G on the FTZ) and their in-camera JPEGs; aggregate colour statistics only, no image content; no Adobe or third-party profile data | MIT OR Apache-2.0 | 2026-10-13 | none |
| `assets/camera-profiles/NIKON_Z_8.json` | Nikon Z 8 camera colour profile (matrix + hue/saturation/value table), built into LightCraft | Michael Anderson (@endthestart) | original work: fitted by `lightcraft-cli calibrate` to 261 usable Z 8 NEFs of my own (of 278, 2023 and 2026, nearly all Standard picture control, lossless 14-bit; NIKKOR Z 24-120mm f/4 S and AF-S 70-200mm f/2.8G on the FTZ) and their in-camera JPEGs; aggregate colour statistics only, no image content; no Adobe or third-party profile data | MIT OR Apache-2.0 | 2026-10-13 | none |
| `assets/camera-profiles/NIKON_D5300.json` | Nikon D5300 camera colour profile (matrix + hue/saturation/value table), built into LightCraft | Michael Anderson (@endthestart) | original work: fitted by `lightcraft-cli calibrate` to 264 usable D5300 NEFs of my own (of 273, 2014 to 2017, mostly Standard picture control, lossy 12-bit, mostly the AF-S DX 35mm f/1.8G) and their in-camera JPEGs; aggregate colour statistics only, no image content; no Adobe or third-party profile data | MIT OR Apache-2.0 | 2026-10-13 | none |
-| `assets/camera-profiles/Canon_EOS_R5_C.json` | Canon EOS R5 C camera colour profile (matrix + hue/saturation/value table), built into Chromaforge | Chromaforge contributors; source photographs supplied by Roman Alurkoff (RAD Films) | original work: fitted by ` calibrate` to 398 usable EOS R5 C CR3s of his own (of 400, two bodies, four wedding and portrait shoots, September and October 2026) and their in-camera JPEGs; aggregate colour statistics only, no image content; no Adobe or third-party profile data | MIT OR Apache-2.0 | 2026-10-16 | none |
-| `assets/camera-profiles/NIKON_D780.json` | Nikon D780 camera colour profile (matrix + hue/saturation/value table + tone curve), built into the app | Rob Dunn (@robmdunn) | original work: fitted by ` calibrate` to 255 usable D780 NEFs of my own (300 sampled evenly from 1,093) and their in-camera JPEGs; aggregate colour and tone statistics only, no image content; no Adobe or third-party profile data | MIT OR Apache-2.0 | 2026-10-16 | none |
-| `assets/camera-profiles/NIKON_D750.json` | Nikon D750 camera colour profile (matrix + hue/saturation/value table + tone curve), built into the app | Rob Dunn (@robmdunn) | original work: fitted by ` calibrate` to 276 usable D750 NEFs of my own (300 sampled evenly from 12,630) and their in-camera JPEGs; aggregate colour and tone statistics only, no image content; no Adobe or third-party profile data | MIT OR Apache-2.0 | 2026-10-16 | none |
-| `assets/camera-profiles/NIKON_D90.json` | Nikon D90 camera colour profile (matrix + hue/saturation/value table + tone curve), built into the app | Rob Dunn (@robmdunn) | original work: fitted by ` calibrate` to 289 usable D90 NEFs of my own (300 sampled evenly from 3,557) and their in-camera JPEGs; aggregate colour and tone statistics only, no image content; no Adobe or third-party profile data | MIT OR Apache-2.0 | 2026-10-16 | none |
-| `assets/camera-profiles/NIKON_D70.json` | Nikon D70 camera colour profile (matrix + hue/saturation/value table), built into the app | David Coen (@theDavidCoen) | original work: fitted by ` calibrate` to 379 usable D70 NEFs sampled evenly from 3,650 of the contributor's own photos (1,313,897 colour pairs) and their in-camera JPEGs; aggregate colour statistics only, no image content; no Adobe or third-party profile data (upstream #2160) | MIT OR Apache-2.0 | 2026-10-26 | none |
-| `assets/camera-profiles/NIKON_D700.json` | Nikon D700 camera colour profile (matrix + hue/saturation/value table), built into the app | David Coen (@theDavidCoen) | original work: fitted by ` calibrate` to 394 usable D700 NEFs sampled evenly from 8,487 of the contributor's own photos (1,386,109 colour pairs) and their in-camera JPEGs; aggregate colour statistics only, no image content; no Adobe or third-party profile data (upstream #2160) | MIT OR Apache-2.0 | 2026-10-26 | none |
-| `assets/camera-profiles/X20.json` | Fujifilm X20 (PROVIA film simulation) camera colour profile (matrix + hue/saturation/value table), built into the app | David Coen (@theDavidCoen) | original work: fitted by ` calibrate` to 396 usable X20 RAFs shot with PROVIA, sampled from 2,011 (1,414,745 colour pairs) and their in-camera JPEGs; aggregate colour statistics only, no image content; no Adobe or third-party profile data (upstream #2160) | MIT OR Apache-2.0 | 2026-10-26 | none |
-| `assets/camera-profiles/X100T.json` | Fujifilm X100T (PROVIA film simulation) camera colour profile (matrix + hue/saturation/value table), built into the app | David Coen (@theDavidCoen) | original work: fitted by ` calibrate` to 32 usable X100T RAFs shot with PROVIA, of 37 (105,558 colour pairs) and their in-camera JPEGs; aggregate colour statistics only, no image content; no Adobe or third-party profile data (upstream #2160) | MIT OR Apache-2.0 | 2026-10-26 | none |
-| `assets/camera-profiles/X-T1.json` | Fujifilm X-T1 (PROVIA film simulation) camera colour profile (matrix + hue/saturation/value table), built into the app | David Coen (@theDavidCoen) | original work: fitted by ` calibrate` to 217 usable X-T1 RAFs shot with PROVIA (625,876 colour pairs) and their in-camera JPEGs; aggregate colour statistics only, no image content; no Adobe or third-party profile data (upstream #2160) | MIT OR Apache-2.0 | 2026-10-26 | none |
-| `crates/camdb/data/calibrations/CANON_Canon_EOS_R6.json` | Canon Canon EOS R6 camera calibration matched to Lightroom (colour model + looks: Adobe Color, Adobe Standard, Adaptive B&W, Adaptive Color, Adobe Landscape, Adobe Monochrome, Adobe Portrait, Adobe Vivid), built into the app | contributors | original work: black-box fit by ` calibrate-lightroom` to 4 photos and their Lightroom exports; aggregate statistics only, no image content; no profile data of the editor's | MIT OR Apache-2.0 | 2026-10-26 | none |
-| `crates/camdb/data/calibrations/PANASONIC_DMC-GM1.json` | Panasonic DMC-GM1 camera calibration matched to Lightroom (colour model + looks: Adobe Color, Adobe Standard, Adaptive B&W, Adaptive Color, Adobe Landscape, Adobe Monochrome, Adobe Portrait, Adobe Vivid), built into the app | contributors | original work: black-box fit by ` calibrate-lightroom` to 205 photos and their Lightroom exports; aggregate statistics only, no image content; no profile data of the editor's | MIT OR Apache-2.0 | 2026-10-26 | none |
-| `crates/camdb/data/calibrations/OLYMPUS_E-M1MarkII.json` | OLYMPUS CORPORATION E-M1MarkII camera calibration matched to Lightroom (colour model + looks: Adobe Color, Adobe Standard, Adobe Landscape, Adobe Monochrome, Adobe Portrait, Adobe Vivid), built into the app | contributors | original work: black-box fit by ` calibrate-lightroom` to 33 photos and their Lightroom exports; aggregate statistics only, no image content; no profile data of the editor's | MIT OR Apache-2.0 | 2026-10-31 | none |
-| `crates/camdb/data/calibrations/OM_OM-1.json` | OM Digital Solutions OM-1 camera calibration matched to Lightroom (colour model + looks: Adobe Color, Adobe Standard, Adobe Landscape, Adobe Monochrome, Adobe Portrait, Adobe Vivid), built into the app | contributors | original work: black-box fit by ` calibrate-lightroom` to 40 photos and their Lightroom exports; aggregate statistics only, no image content; no profile data of the editor's | MIT OR Apache-2.0 | 2026-10-31 | none |
-| `crates/camdb/data/calibrations/OM_OM-3.json` | OM Digital Solutions OM-3 camera calibration matched to Lightroom (colour model + looks: Adobe Standard, Adobe Landscape, Adobe Portrait, Adobe Vivid), built into the app | Matthew Takemoto | original work: black-box fit by ` calibrate-lightroom` to 32 photos and their Lightroom exports by Matthew Takemoto; aggregate statistics only, no image content; no profile data of the editor's | MIT OR Apache-2.0 | 2026-10-31 | none |
-| `crates/camdb/data/calibrations/RICOH_RICOH_GR_III.json` | RICOH IMAGING COMPANY, LTD. RICOH GR III camera calibration matched to Lightroom (colour model + looks: Adobe Color, Adobe Standard, Adobe Landscape, Adobe Monochrome, Adobe Portrait, Adobe Vivid), built into the app | contributors | original work: black-box fit by ` calibrate-lightroom` to 45 photos and their Lightroom exports; aggregate statistics only, no image content; no profile data of the editor's | MIT OR Apache-2.0 | 2026-10-31 | none |
-| `crates/camdb/data/calibrations/RICOH_RICOH_GR_IV.json` | RICOH IMAGING COMPANY, LTD. RICOH GR IV camera calibration matched to Lightroom (colour model + looks: Adobe Color, Adobe Standard, Adobe Landscape, Adobe Portrait, Adobe Vivid), built into the app | Matthew Takemoto | original work: black-box fit by ` calibrate-lightroom` to 32 photos and their Lightroom exports by Matthew Takemoto; aggregate statistics only, no image content; no profile data of the editor's | MIT OR Apache-2.0 | 2026-10-31 | none |
-| `crates/camdb/data/calibrations/SONY_ILCE-1.json` | SONY ILCE-1 camera calibration matched to Lightroom (colour model + looks: Adobe Color, Adobe Standard, Adaptive B&W, Adaptive Color, Adobe Landscape, Adobe Monochrome, Adobe Portrait, Adobe Vivid), built into the app | contributors | original work: black-box fit by ` calibrate-lightroom` to 124 photos and their Lightroom exports; aggregate statistics only, no image content; no profile data of the editor's | MIT OR Apache-2.0 | 2026-10-31 | none |
-| `crates/camdb/data/calibrations/XIAOMI_Xiaomi_17_Ultra_2512BPNDAG.json` | Xiaomi Xiaomi 17 Ultra/2512BPNDAG camera calibration matched to Lightroom (colour model + looks: Adobe Color, Adobe Standard, Adaptive B&W, Adaptive Color, Adobe Landscape, Adobe Monochrome, Adobe Portrait, Adobe Vivid), built into the app | contributors | original work: black-box fit by ` calibrate-lightroom` to 32 photos and their Lightroom exports; aggregate statistics only, no image content; no profile data of the editor's | MIT OR Apache-2.0 | 2026-10-31 | none |
-| `crates/camdb/data/calibrations/NIKON_NIKON_Z6_3.json` | NIKON CORPORATION NIKON Z6_3 camera calibration matched to Lightroom (colour model + looks: Adobe Standard), built into the app | deunderscorepaul | original work: black-box fit by ` calibrate-lightroom` to 16 photos and their Lightroom exports by deunderscorepaul; aggregate statistics only, no image content; no profile data of the editor's | MIT OR Apache-2.0 | 2026-11-01 | overfitted hue_sat_map removed (caused severe purple/magenta discoloration in blue and dark tones) |
-| `crates/camdb/data/calibrations/PANASONIC_DC-G9.json` | Panasonic DC-G9 camera calibration matched to Lightroom (colour model + looks: Adobe Standard), built into the app | contributors | original work: black-box fit by ` calibrate-lightroom` to 5 photos and their Lightroom exports; aggregate statistics only, no image content; no profile data of the editor's | MIT OR Apache-2.0 | 2026-11-08 | none |
-| `crates/camdb/data/calibrations/CANON_Canon_EOS_R5_C.json` | Canon Canon EOS R5 C camera calibration matched to Lightroom (colour model + looks: Adobe Standard), built into the app | contributors | original work: black-box fit by ` calibrate-lightroom` to 143 photos and their Lightroom exports; aggregate statistics only, no image content; no profile data of the editor's | MIT OR Apache-2.0 | 2026-11-08 | none |
-| `crates/camdb/data/calibrations/RICOH_PENTAX_K-3.json` | RICOH IMAGING COMPANY, LTD. PENTAX K-3 camera calibration matched to Lightroom (colour model + looks: Adobe Color, Adobe Standard, Adaptive Color, Adaptive B&W, Adobe Vivid, Adobe Landscape, Adobe Monochrome, Adobe Portrait), built into the app | contributors | original work: black-box fit by ` calibrate-lightroom` to 63 photos and their Lightroom exports; aggregate statistics only, no image content; no profile data of the editor's | MIT OR Apache-2.0 | 2026-11-10 | none |
-| `crates/camdb/data/calibrations/SONY_ILCE-7M5.json` | SONY ILCE-7M5 camera calibration matched to Lightroom (colour model + looks: Adobe Color, Adobe Standard), built into the app | contributors | original work: black-box fit by ` calibrate-lightroom` to 75 photos and their Lightroom exports; aggregate statistics only, no image content; no profile data of the editor's | MIT OR Apache-2.0 | 2026-11-10 | none |
-| `crates/camdb/data/calibrations/SONY_ILCE-7M3.json` | SONY ILCE-7M3 camera calibration matched to Lightroom (colour model + looks: Adobe Color, Adobe Standard, Camera Standard), built into the app | contributors | original work: black-box fit by ` calibrate-lightroom` to 195 photos and their Lightroom exports; aggregate statistics only, no image content; no profile data of the editor's | MIT OR Apache-2.0 | 2026-11-29 | none |
-| `crates/camdb/data/calibrations/CANON_Canon_EOS_R5m2.json` | Canon Canon EOS R5m2 camera calibration matched to Lightroom (colour model + looks: Adobe Color, Adobe Standard), built into the app | contributors | original work: black-box fit by ` calibrate-lightroom` to 96 photos and their Lightroom exports; aggregate statistics only, no image content; no profile data of the editor's | MIT OR Apache-2.0 | 2026-11-29 | none |
+| `assets/camera-profiles/Canon_EOS_R5_C.json` | Canon EOS R5 C camera colour profile (matrix + hue/saturation/value table), built into Chromaforge | Chromaforge contributors; source photographs supplied by Roman Alurkoff (RAD Films) | original work: fitted by `chromaforge-cli calibrate` to 398 usable EOS R5 C CR3s of his own (of 400, two bodies, four wedding and portrait shoots, September and October 2026) and their in-camera JPEGs; aggregate colour statistics only, no image content; no Adobe or third-party profile data | MIT OR Apache-2.0 | 2026-10-16 | none |
+| `assets/camera-profiles/NIKON_D780.json` | Nikon D780 camera colour profile (matrix + hue/saturation/value table + tone curve), built into the app | Rob Dunn (@robmdunn) | original work: fitted by `chromaforge-cli calibrate` to 255 usable D780 NEFs of my own (300 sampled evenly from 1,093) and their in-camera JPEGs; aggregate colour and tone statistics only, no image content; no Adobe or third-party profile data | MIT OR Apache-2.0 | 2026-10-16 | none |
+| `assets/camera-profiles/NIKON_D750.json` | Nikon D750 camera colour profile (matrix + hue/saturation/value table + tone curve), built into the app | Rob Dunn (@robmdunn) | original work: fitted by `chromaforge-cli calibrate` to 276 usable D750 NEFs of my own (300 sampled evenly from 12,630) and their in-camera JPEGs; aggregate colour and tone statistics only, no image content; no Adobe or third-party profile data | MIT OR Apache-2.0 | 2026-10-16 | none |
+| `assets/camera-profiles/NIKON_D90.json` | Nikon D90 camera colour profile (matrix + hue/saturation/value table + tone curve), built into the app | Rob Dunn (@robmdunn) | original work: fitted by `chromaforge-cli calibrate` to 289 usable D90 NEFs of my own (300 sampled evenly from 3,557) and their in-camera JPEGs; aggregate colour and tone statistics only, no image content; no Adobe or third-party profile data | MIT OR Apache-2.0 | 2026-10-16 | none |
+| `assets/camera-profiles/NIKON_D70.json` | Nikon D70 camera colour profile (matrix + hue/saturation/value table), built into the app | David Coen (@theDavidCoen) | original work: fitted by `chromaforge-cli calibrate` to 379 usable D70 NEFs sampled evenly from 3,650 of the contributor's own photos (1,313,897 colour pairs) and their in-camera JPEGs; aggregate colour statistics only, no image content; no Adobe or third-party profile data (upstream #2160) | MIT OR Apache-2.0 | 2026-10-26 | none |
+| `assets/camera-profiles/NIKON_D700.json` | Nikon D700 camera colour profile (matrix + hue/saturation/value table), built into the app | David Coen (@theDavidCoen) | original work: fitted by `chromaforge-cli calibrate` to 394 usable D700 NEFs sampled evenly from 8,487 of the contributor's own photos (1,386,109 colour pairs) and their in-camera JPEGs; aggregate colour statistics only, no image content; no Adobe or third-party profile data (upstream #2160) | MIT OR Apache-2.0 | 2026-10-26 | none |
+| `assets/camera-profiles/X20.json` | Fujifilm X20 (PROVIA film simulation) camera colour profile (matrix + hue/saturation/value table), built into the app | David Coen (@theDavidCoen) | original work: fitted by `chromaforge-cli calibrate` to 396 usable X20 RAFs shot with PROVIA, sampled from 2,011 (1,414,745 colour pairs) and their in-camera JPEGs; aggregate colour statistics only, no image content; no Adobe or third-party profile data (upstream #2160) | MIT OR Apache-2.0 | 2026-10-26 | none |
+| `assets/camera-profiles/X100T.json` | Fujifilm X100T (PROVIA film simulation) camera colour profile (matrix + hue/saturation/value table), built into the app | David Coen (@theDavidCoen) | original work: fitted by `chromaforge-cli calibrate` to 32 usable X100T RAFs shot with PROVIA, of 37 (105,558 colour pairs) and their in-camera JPEGs; aggregate colour statistics only, no image content; no Adobe or third-party profile data (upstream #2160) | MIT OR Apache-2.0 | 2026-10-26 | none |
+| `assets/camera-profiles/X-T1.json` | Fujifilm X-T1 (PROVIA film simulation) camera colour profile (matrix + hue/saturation/value table), built into the app | David Coen (@theDavidCoen) | original work: fitted by `chromaforge-cli calibrate` to 217 usable X-T1 RAFs shot with PROVIA (625,876 colour pairs) and their in-camera JPEGs; aggregate colour statistics only, no image content; no Adobe or third-party profile data (upstream #2160) | MIT OR Apache-2.0 | 2026-10-26 | none |
+| `crates/camdb/data/calibrations/CANON_Canon_EOS_R6.json` | Canon Canon EOS R6 camera calibration matched to Lightroom (colour model + looks: Adobe Color, Adobe Standard, Adaptive B&W, Adaptive Color, Adobe Landscape, Adobe Monochrome, Adobe Portrait, Adobe Vivid), built into the app | contributors | original work: black-box fit by `chromaforge-cli calibrate-lightroom` to 4 photos and their Lightroom exports; aggregate statistics only, no image content; no profile data of the editor's | MIT OR Apache-2.0 | 2026-10-26 | none |
+| `crates/camdb/data/calibrations/PANASONIC_DMC-GM1.json` | Panasonic DMC-GM1 camera calibration matched to Lightroom (colour model + looks: Adobe Color, Adobe Standard, Adaptive B&W, Adaptive Color, Adobe Landscape, Adobe Monochrome, Adobe Portrait, Adobe Vivid), built into the app | contributors | original work: black-box fit by `chromaforge-cli calibrate-lightroom` to 205 photos and their Lightroom exports; aggregate statistics only, no image content; no profile data of the editor's | MIT OR Apache-2.0 | 2026-10-26 | none |
+| `crates/camdb/data/calibrations/OLYMPUS_E-M1MarkII.json` | OLYMPUS CORPORATION E-M1MarkII camera calibration matched to Lightroom (colour model + looks: Adobe Color, Adobe Standard, Adobe Landscape, Adobe Monochrome, Adobe Portrait, Adobe Vivid), built into the app | contributors | original work: black-box fit by `chromaforge-cli calibrate-lightroom` to 33 photos and their Lightroom exports; aggregate statistics only, no image content; no profile data of the editor's | MIT OR Apache-2.0 | 2026-10-31 | none |
+| `crates/camdb/data/calibrations/OM_OM-1.json` | OM Digital Solutions OM-1 camera calibration matched to Lightroom (colour model + looks: Adobe Color, Adobe Standard, Adobe Landscape, Adobe Monochrome, Adobe Portrait, Adobe Vivid), built into the app | contributors | original work: black-box fit by `chromaforge-cli calibrate-lightroom` to 40 photos and their Lightroom exports; aggregate statistics only, no image content; no profile data of the editor's | MIT OR Apache-2.0 | 2026-10-31 | none |
+| `crates/camdb/data/calibrations/OM_OM-3.json` | OM Digital Solutions OM-3 camera calibration matched to Lightroom (colour model + looks: Adobe Standard, Adobe Landscape, Adobe Portrait, Adobe Vivid), built into the app | Matthew Takemoto | original work: black-box fit by `chromaforge-cli calibrate-lightroom` to 32 photos and their Lightroom exports by Matthew Takemoto; aggregate statistics only, no image content; no profile data of the editor's | MIT OR Apache-2.0 | 2026-10-31 | none |
+| `crates/camdb/data/calibrations/RICOH_RICOH_GR_III.json` | RICOH IMAGING COMPANY, LTD. RICOH GR III camera calibration matched to Lightroom (colour model + looks: Adobe Color, Adobe Standard, Adobe Landscape, Adobe Monochrome, Adobe Portrait, Adobe Vivid), built into the app | contributors | original work: black-box fit by `chromaforge-cli calibrate-lightroom` to 45 photos and their Lightroom exports; aggregate statistics only, no image content; no profile data of the editor's | MIT OR Apache-2.0 | 2026-10-31 | none |
+| `crates/camdb/data/calibrations/RICOH_RICOH_GR_IV.json` | RICOH IMAGING COMPANY, LTD. RICOH GR IV camera calibration matched to Lightroom (colour model + looks: Adobe Color, Adobe Standard, Adobe Landscape, Adobe Portrait, Adobe Vivid), built into the app | Matthew Takemoto | original work: black-box fit by `chromaforge-cli calibrate-lightroom` to 32 photos and their Lightroom exports by Matthew Takemoto; aggregate statistics only, no image content; no profile data of the editor's | MIT OR Apache-2.0 | 2026-10-31 | none |
+| `crates/camdb/data/calibrations/SONY_ILCE-1.json` | SONY ILCE-1 camera calibration matched to Lightroom (colour model + looks: Adobe Color, Adobe Standard, Adaptive B&W, Adaptive Color, Adobe Landscape, Adobe Monochrome, Adobe Portrait, Adobe Vivid), built into the app | contributors | original work: black-box fit by `chromaforge-cli calibrate-lightroom` to 124 photos and their Lightroom exports; aggregate statistics only, no image content; no profile data of the editor's | MIT OR Apache-2.0 | 2026-10-31 | none |
+| `crates/camdb/data/calibrations/XIAOMI_Xiaomi_17_Ultra_2512BPNDAG.json` | Xiaomi Xiaomi 17 Ultra/2512BPNDAG camera calibration matched to Lightroom (colour model + looks: Adobe Color, Adobe Standard, Adaptive B&W, Adaptive Color, Adobe Landscape, Adobe Monochrome, Adobe Portrait, Adobe Vivid), built into the app | contributors | original work: black-box fit by `chromaforge-cli calibrate-lightroom` to 32 photos and their Lightroom exports; aggregate statistics only, no image content; no profile data of the editor's | MIT OR Apache-2.0 | 2026-10-31 | none |
+| `crates/camdb/data/calibrations/NIKON_NIKON_Z6_3.json` | NIKON CORPORATION NIKON Z6_3 camera calibration matched to Lightroom (colour model + looks: Adobe Standard), built into the app | deunderscorepaul | original work: black-box fit by `chromaforge-cli calibrate-lightroom` to 16 photos and their Lightroom exports by deunderscorepaul; aggregate statistics only, no image content; no profile data of the editor's | MIT OR Apache-2.0 | 2026-11-01 | overfitted hue_sat_map removed (caused severe purple/magenta discoloration in blue and dark tones) |
+| `crates/camdb/data/calibrations/PANASONIC_DC-G9.json` | Panasonic DC-G9 camera calibration matched to Lightroom (colour model + looks: Adobe Standard), built into the app | contributors | original work: black-box fit by `chromaforge-cli calibrate-lightroom` to 5 photos and their Lightroom exports; aggregate statistics only, no image content; no profile data of the editor's | MIT OR Apache-2.0 | 2026-11-08 | none |
+| `crates/camdb/data/calibrations/CANON_Canon_EOS_R5_C.json` | Canon Canon EOS R5 C camera calibration matched to Lightroom (colour model + looks: Adobe Standard), built into the app | contributors | original work: black-box fit by `chromaforge-cli calibrate-lightroom` to 143 photos and their Lightroom exports; aggregate statistics only, no image content; no profile data of the editor's | MIT OR Apache-2.0 | 2026-11-08 | none |
+| `crates/camdb/data/calibrations/RICOH_PENTAX_K-3.json` | RICOH IMAGING COMPANY, LTD. PENTAX K-3 camera calibration matched to Lightroom (colour model + looks: Adobe Color, Adobe Standard, Adaptive Color, Adaptive B&W, Adobe Vivid, Adobe Landscape, Adobe Monochrome, Adobe Portrait), built into the app | contributors | original work: black-box fit by `chromaforge-cli calibrate-lightroom` to 63 photos and their Lightroom exports; aggregate statistics only, no image content; no profile data of the editor's | MIT OR Apache-2.0 | 2026-11-10 | none |
+| `crates/camdb/data/calibrations/SONY_ILCE-7M5.json` | SONY ILCE-7M5 camera calibration matched to Lightroom (colour model + looks: Adobe Color, Adobe Standard), built into the app | contributors | original work: black-box fit by `chromaforge-cli calibrate-lightroom` to 75 photos and their Lightroom exports; aggregate statistics only, no image content; no profile data of the editor's | MIT OR Apache-2.0 | 2026-11-10 | none |
+| `crates/camdb/data/calibrations/SONY_ILCE-7M3.json` | SONY ILCE-7M3 camera calibration matched to Lightroom (colour model + looks: Adobe Color, Adobe Standard, Camera Standard), built into the app | contributors | original work: black-box fit by `chromaforge-cli calibrate-lightroom` to 195 photos and their Lightroom exports; aggregate statistics only, no image content; no profile data of the editor's | MIT OR Apache-2.0 | 2026-11-29 | none |
+| `crates/camdb/data/calibrations/CANON_Canon_EOS_R5m2.json` | Canon Canon EOS R5m2 camera calibration matched to Lightroom (colour model + looks: Adobe Color, Adobe Standard), built into the app | contributors | original work: black-box fit by `chromaforge-cli calibrate-lightroom` to 96 photos and their Lightroom exports; aggregate statistics only, no image content; no profile data of the editor's | MIT OR Apache-2.0 | 2026-11-29 | none |
| `crates/camprof/src/data/cmf.rs`, `crates/camprof/src/data/illuminants.rs` | CIE 1931 2° colour-matching functions (360–830 nm, 5 nm) and the relative spectral power distributions of CIE standard illuminants A, D50, D55, D65, D75 and E | CIE (Commission Internationale de l'Éclairage); transcribed by RAD Films - Roman Alurkoff for RADcamProfiles | CIE 015:2018 / ISO/CIE 11664-1 and -2 published tables (https://cie.co.at/data-tables); via RADcamProfiles commit dd8003f | Published standard data; the CIE distributes these data tables under a Creative Commons licence (public standard data); the transcription MIT OR Apache-2.0 | 2026-10-13 | 1964 10°, 2006 and Judd–Vos observer tables of the source left out |
| `crates/camprof/src/reference.rs` (`COLORCHECKER_CLASSIC`) | Reference values (CIELAB, D50, 2°) of the 24 patches of the ColorChecker Classic / Mini / Passport, as made before November 2014 | X-Rite (formerly GretagMacbeth): published measurement averages; transcribed by RAD Films - Roman Alurkoff for RADcamProfiles | X-Rite's published ColorChecker values (the same numbers are reproduced widely, e.g. ArgyllCMS `ColorChecker.cie`, BabelColor); via RADcamProfiles commit dd8003f | Factual measurement data published by the chart's maker without a stated licence; public factual data; clean-room, own work, confirmed by the author 2026-11-03. No X-Rite software, spectra or file is included | 2026-10-13 | none; the 2014 and Digital SG values of the source (computed from spectra shipped with X-Rite software) are left out |
| `crates/colourfit/src/chart.rs` | ColorChecker Classic reference colours (24 patches, CIE L*a*b* under ICC D50, for charts made before and after November 2014), in the `LAB_2014` and `LAB_2005` tables | X-Rite (published 2016); collected by Colour Developers in colour-science | https://github.com/colour-science/colour, tag v0.4.6, `colour/characterisation/datasets/colour_checkers/chromaticity_coordinates.py` | measurement data (facts) as published by X-Rite; colour-science's collection BSD-3-Clause | 2026-10-26 | values copied as published; nothing else from colour-science is used |
| `crates/camdb/data/cameras/dcraw.toml` | Camera colour matrices (one XYZ D65 → camera matrix per model, about 550 models) | Dave Coffin, dcraw.c `adobe_coeff` table: most rows read from Adobe DNG Converter, rows marked DJC measured by Dave Coffin | dcraw.c 9.28, Revision 1.478 (Debian `dcraw_9.28.orig.tar.gz`, dcraw.c sha256 d18d9e43a096eea04eee2148e53068f8fa45ce95395d97128b1aa37b477eab43) | dcraw.c: "No license is required to download and use dcraw.c"; only its Foveon functions are restricted, "all other code remains free for all uses" | 2026-10-26 | generated by `tools/dcraw_adobe_coeff.py`: 3×3 rows only (four-colour and level-only rows skipped), divided by 10000, dcraw's levels dropped, extra rows under the Exif makes Ricoh (Pentax), Konica Minolta and Eastman Kodak |
-| `assets/camera-profiles/ILCE-7RM5.json` | Sony ILCE-7RM5 camera colour profile (matrix + hue/saturation/value table), built into the app | Yule (Brian) Wang (@peaperfish) | original work: fitted by ` calibrate` to 220 usable ILCE-7RM5 ARWs of my own (of 241, 2025 to 2026, Standard creative style; Sigma 24-70mm F2.8 DG DN II Art and Sony FE 200-600mm F5.6-6.3 G OSS) and their in-camera JPEGs; aggregate colour statistics only, no image content; no Adobe or third-party profile data | MIT OR Apache-2.0 | 2026-10-26 | none |
-| `assets/camera-profiles/DMC-GM5.json` | Panasonic DMC-GM5 camera colour profile (matrix + hue/saturation/value table), built into the app | upstream contributors; source photographs supplied by @djlieu | original work: fitted by ` calibrate` to 1,520 usable DMC-GM5 RW2s (of 1,562, 2016 to 2025) and their in-camera JPEGs; aggregate colour statistics only, no image content; no Adobe or third-party profile data; taken unchanged from upstream #4064 | MIT OR Apache-2.0 | 2026-11-10 | none |
+| `assets/camera-profiles/ILCE-7RM5.json` | Sony ILCE-7RM5 camera colour profile (matrix + hue/saturation/value table), built into the app | Yule (Brian) Wang (@peaperfish) | original work: fitted by `chromaforge-cli calibrate` to 220 usable ILCE-7RM5 ARWs of my own (of 241, 2025 to 2026, Standard creative style; Sigma 24-70mm F2.8 DG DN II Art and Sony FE 200-600mm F5.6-6.3 G OSS) and their in-camera JPEGs; aggregate colour statistics only, no image content; no Adobe or third-party profile data | MIT OR Apache-2.0 | 2026-10-26 | none |
+| `assets/camera-profiles/DMC-GM5.json` | Panasonic DMC-GM5 camera colour profile (matrix + hue/saturation/value table), built into the app | upstream contributors; source photographs supplied by @djlieu | original work: fitted by `chromaforge-cli calibrate` to 1,520 usable DMC-GM5 RW2s (of 1,562, 2016 to 2025) and their in-camera JPEGs; aggregate colour statistics only, no image content; no Adobe or third-party profile data; taken unchanged from upstream #4064 | MIT OR Apache-2.0 | 2026-11-10 | none |
| `crates/raw/src/spectral_table.rs` | Camera colour matrices (DNG ColorMatrix1/2 and ForwardMatrix1/2 for Standard Illuminant A and D65) for 52 camera models, and the model alias list | Derived by LightCraft contributors from rawtoaces-data (Academy Software Foundation): camera spectral sensitivities measured by Weta Digital (44 cameras), scitech (7) and Jonathon Irons at the National Physical Laboratory (Nikon D5100); training reflectances; CIE 1931 colour-matching functions (CIE, CC-BY-4.0, as shipped in rawtoaces-data) | https://github.com/AcademySoftwareFoundation/rawtoaces-data, tag v1.1.0, commit 5cfa53707b053594b2d0d48e8019fb56e6582d6c | Apache-2.0 (`LICENSE-APACHE`); the colour-matching functions CC-BY-4.0 | 2026-10-08 | generated by `tools/spectral_camera_table.py`: a 3×3 matrix per illuminant fitted to the spectral data (no measurement copied verbatim); aliases copied from `data/aliases.json`; no Adobe or third-party camera matrix |
| `assets/camera-tone/sony-dro-off.json` | Sony global tone curve with the Dynamic Range Optimizer off (32 knots), built into LightCraft for ARWs shot with DRO on | LightCraft contributors; source photographs by raw.pixls.us contributors | original work: tone curve quantile-matched over the pooled pixel pairs of 12 CC0 raw.pixls.us ARWs (DRO off, Standard creative style; ILCE-3500, -5000, -6600, -7CR, -7M3 ×3, -7S, -9M2, ILCA-77M2, SLT-A57, NEX-F3) and their embedded camera JPEGs; the file lists each source URL and SHA-256 and how the curve was derived (see also `docs/camera-preview-colour.md`); aggregate tone statistics only, no image content; no Adobe or third-party profile data | MIT OR Apache-2.0 (sources CC0) | 2026-10-09 | none |
| `crates/camprof/src/data/cmf.rs`, `crates/camprof/src/data/illuminants.rs` | CIE 1931 2° colour-matching functions (360–830 nm, 5 nm) and the relative spectral power distributions of CIE standard illuminants A, D50, D55, D65, D75 and E | CIE (Commission Internationale de l'Éclairage); transcribed by RAD Films - Roman Alurkoff for RADcamProfiles | CIE 015:2018 / ISO/CIE 11664-1 and -2 published tables (https://cie.co.at/data-tables); via RADcamProfiles commit dd8003f | Published standard data; the CIE distributes these data tables under a Creative Commons licence (see the open question in the camera-profiling PR notes on the exact variant); the transcription MIT OR Apache-2.0 | 2026-10-13 | 1964 10°, 2006 and Judd–Vos observer tables of the source left out |
@@ -59,16 +59,16 @@ covers a whole directory), or if a licence file referenced in the Licence column
| `assets/surface-icons/{mask-invert,brush-erase,brush-new,mask-previous,mask-next,mask-visible,zoom-fit-view,zoom-actual-size,select-all-photos,select-no-photos,rotate-photo-left,rotate-photo-right,reset-develop,preset-apply,preset-apply-ai}.svg` (15 icons) | Surface icons for functions that shared one generic pack icon (the two preset icons, 2026-10-22: a key that applies a preset, with an "AI" mark for AI-mask presets) | drawn by an AI agent (Claude) for LightCraft in the TactileBridge pack's style | original work | MIT, part of the pack (`assets/surface-icons/LICENSE.txt`) | 2026-10-16 | none; new files beside the pack's originals, which are unchanged |
| `crates/scenes/` (generated images) | Procedural demo photographs | LightCraft contributors | original work (generated at runtime, no source imagery) | MIT OR Apache-2.0 | 2026-09-30 | n/a |
| `crates/ui-egui/src/icons.rs` | UI icons drawn as vector paths in code, except the Lucide-derived arms in the next row; GuidedUpright (2026-11-24, issue #1274) is original | LightCraft contributors | original work | MIT OR Apache-2.0 | 2026-09-30 | n/a |
-| `crates/ui-egui/src/icons.rs` (`Target`, the reticle, and `Bucket`, the paint bucket) | Targeted Adjustment and mask Color icons drawn as vector paths in code (issues #1301, #1305) | Chromaforge contributors | original work | MIT OR GPL-3.0-or-later | 2026-11-24 | n/a; `Target` replaces the earlier picker-and-arrow drawing |
+| `crates/ui-egui/src/icons.rs` (`Target`, the reticle, and `Bucket`, the paint bucket) | Targeted Adjustment and mask Color icons drawn as vector paths in code (issues #1301, #1305) | Chromaforge contributors | original work | GPL-3.0-or-later | 2026-11-24 | n/a; `Target` replaces the earlier picker-and-arrow drawing |
| `crates/ui-egui/src/eyedropper.rs` | Eyedropper pointer of the colour pickers, drawn as vector shapes in code | OneSlips, ported by Chromaforge contributors | original work | MIT | 2026-11-03 | none |
| `crates/ui-egui/src/icons.rs` (the arms that call `lucide!`, each commented with its Lucide name: Activity, Auto, Bell, Brush, Burn, Cloud, Crop, Depth, Describe, Eraser, Eye, EyeOff, Filmstrip, FlagPick, FlagReject, FlipH, FlipV, Gear, Landscape, Link, MapPin, MaskAdd, MaskIntersect, MaskSubtract, Object, Palette, Pause, People, Picker, Play, Presets, RedEye, Reset, RotateLeft, RotateRight, Sky, Sliders, StepBack, StepForward, Straighten, Unlink, Versions) | UI icons adapted from Lucide | Lucide Contributors (portions Cole Bemis, Feather) | https://lucide.dev (`lucide-static` 0.460.0) | ISC (`assets/licenses/ISC-Lucide.txt`) | 2026-10-11 | SVG path data embedded as strings, scaled from Lucide's 24-unit grid to ours and stroked at 1.5 units; RedEye adds a solid pupil to `eye`; the Crop panel's icons (2026-10-12: `link-2`, `link-2-off`, `rotate-ccw`, `rotate-cw`, `flip-horizontal-2`, `flip-vertical-2`, `undo-2`, `ruler`, `wand-sparkles`) and mask actions (`squares-unite`, `squares-subtract`, `squares-intersect`) are unmodified; the video controls (2026-10-12: `play`, `skip-forward`, `skip-back` unmodified; `pause` with its rounded rects drawn square); Sliders (2026-10-17, issue #208: `sliders-horizontal`, its lines written as path data, otherwise unmodified); Burn (2026-10-24: `flame`, unmodified); MapPin (2026-11-27, PR #1539: `map-pin`, its circle written as path data, otherwise unmodified); the notice is also in `NOTICE`, which ships with every release |
-| `crates/ui-egui/src/quick_bar.rs` (`paint_glyph`: the clipping glyph) and `crates/ui-egui/src/eye_strip.rs` (`controls`: the ✕ drawn as two strokes) | Quick settings bar and eye focus strip controls drawn in code | Chromaforge contributors | original work | MIT OR GPL-3.0-or-later | 2026-11-15 | n/a; the bar's other glyphs are `icons.rs` icons |
-| `crates/ui-egui/src/help_link.rs` (`draw`: the help link's ring and question mark) | Help link icon drawn in code | Chromaforge contributors | original work | MIT OR GPL-3.0-or-later | 2026-11-15 | n/a |
+| `crates/ui-egui/src/quick_bar.rs` (`paint_glyph`: the clipping glyph) and `crates/ui-egui/src/eye_strip.rs` (`controls`: the ✕ drawn as two strokes) | Quick settings bar and eye focus strip controls drawn in code | Chromaforge contributors | original work | GPL-3.0-or-later | 2026-11-15 | n/a; the bar's other glyphs are `icons.rs` icons |
+| `crates/ui-egui/src/help_link.rs` (`draw`: the help link's ring and question mark) | Help link icon drawn in code | Chromaforge contributors | original work | GPL-3.0-or-later | 2026-11-15 | n/a |
| `crates/ui-egui/src/panels/person.rs` | Up arrow on the People page bulk-confirm control, drawn in code | LightCraft contributors | original work | MIT OR Apache-2.0 | 2026-10-13 | n/a |
-| `docs/images/classic/*.jpg` | Application screenshots of the Classic UI: the seven modules, masking, the histogram scopes, Compare and Survey (procedural demo library) | the app's contributors | original work (captured with ` snapshot --demo --script docs/showcase/classic.jsonl`) | MIT | 2026-10-11 | refreshed 2026-10-20 (0.9.5) |
-| `docs/images/touch/*.jpg` | Application screenshots of the touch layout: tablet Develop, adjust mode, Export sheet, Settings, phone Library (procedural demo library) | the app's contributors | original work (captured with ` snapshot --demo --script docs/showcase/touch.jsonl`) | MIT | 2026-10-23 | tablet-export: the export folder line painted over |
+| `docs/images/classic/*.jpg` | Application screenshots of the Classic UI: the seven modules, masking, the histogram scopes, Compare and Survey (procedural demo library) | the app's contributors | original work (captured with `chromaforge-cli snapshot --demo --script docs/showcase/classic.jsonl`) | MIT | 2026-10-11 | refreshed 2026-10-20 (0.9.5) |
+| `docs/images/touch/*.jpg` | Application screenshots of the touch layout: tablet Develop, adjust mode, Export sheet, Settings, phone Library (procedural demo library) | the app's contributors | original work (captured with `chromaforge-cli snapshot --demo --script docs/showcase/touch.jsonl`) | MIT | 2026-10-23 | tablet-export: the export folder line painted over |
| `docs/manual-site/src/assets/shots/*/*.jpg` | Manual screenshots in the Classic, Modern and Compact layouts (procedural demo library) | the app's contributors | original work (captured with `docs/manual-site/scripts/shots.mjs`) | MIT | 2026-11-09 | resized and compressed |
-| `docs/manual-site/src/assets/shots/classic/getting-started-*.png` | Manual screenshots of the Getting Started guide's pages in the Classic layout (procedural demo library) | the app's contributors | original work (captured headless by `tests_onboarding::every_page_fits_a_desktop_window_and_a_phone` with `_TEST_SHOTS`) | MIT | 2026-11-23 | none |
+| `docs/manual-site/src/assets/shots/classic/getting-started-*.png` | Manual screenshots of the Getting Started guide's pages in the Classic layout (procedural demo library) | the app's contributors | original work (captured headless by `tests_onboarding::every_page_fits_a_desktop_window_and_a_phone` with `CHROMAFORGE_TEST_SHOTS`) | MIT | 2026-11-23 | none |
| `docs/manual-site/scripts/fixtures/capture-one/Originals/*.jpg` | Placeholder photos (64 × 48, one flat colour each) of the synthetic Capture One catalog the manual's import-result shot imports | the app's contributors | original work (generated by `manual_shot_fixture` in `crates/engine/src/capture_one_catalog.rs`) | MIT | 2026-11-14 | none |
| `docs/manual-site/public/favicon.svg` | The manual site's tab icon, a copy of `brand/icon.svg` | the project contributors | original work for this repository | MIT (`LICENSE`) | 2026-11-10 | none |
| craft-fonts: optional build input, not files in this repository | BIZ UDPGothic (Regular, Bold), BIZ UDMincho Regular, Shippori Mincho Regular, Noto Sans CJK SC Regular, Noto Sans Arabic Regular, Noto Sans Thai Regular, Noto Sans Georgian Regular, Noto Sans Hebrew Regular, NanumGothic Regular, Noto Sans Symbols / Symbols 2 Regular | The Noto Project Authors (Arabic, Thai, Georgian, Hebrew, Symbols); NHN Corporation (NanumGothic); Morisawa Inc. / The BIZ UDGothic and BIZ UDMincho Project Authors; The Shippori Mincho Project Authors; Google and Adobe (Noto Sans CJK, maintainer-approved exception; see AGENTS.md) (per craft-fonts' attribution) | https://github.com/storytold/craft-fonts/blob/main/ATTRIBUTION.md | SIL Open Font License 1.1 (each font's OFL.txt in craft-fonts; release packages ship it as OFL-.txt) | 2026-10-06 | none; native builds made with `CRAFT_FONTS_DIR` embed the manifest fonts (all official releases); the web build embeds BIZ UDPGothic Regular, Noto Sans Thai, Noto Sans Georgian and Noto Sans Hebrew Regular and ships Noto Sans CJK SC Regular as a separate font file |
diff --git a/brand.toml b/brand.toml
index 62713c3e48..f6b8171130 100644
--- a/brand.toml
+++ b/brand.toml
@@ -47,7 +47,7 @@ catalog_magic = "PHOTO-CATALOG" # file-format magic; neutral on purp
# The key the in-app updater checks a release's SHA256SUMS.txt.sig against (ed25519 public key, base64;
# `cargo xtask update-key new` prints it); two while the key is being rotated. Empty: this build checks for
# updates and links to the release, but never downloads or installs one. A fork sets its own.
-# Changing it: docs/releasing.md → Update signing key.
+# Changing it: docs/release-process.md → Update signing key.
[updates]
public_keys = ["PtE/NoJCHCje8yQ9XftBT1GN6aT/5TSu6URW9Vp1aaI="]
diff --git a/contributors/contributors.json b/contributors/contributors.json
deleted file mode 100644
index 575d85296f..0000000000
--- a/contributors/contributors.json
+++ /dev/null
@@ -1,96 +0,0 @@
-{
- "schema": 1,
- "repo": "emmertex/lightcraft-classic",
- "branch": "main",
- "head": "b0d928d5d611edb7866657d8ddddc2c9461c20b0",
- "head_date": "2026-10-18T09:37:46+11:00",
- "commits": 789,
- "unattributed_commits": 0,
- "contributors": [
- {
- "login": "emmertex",
- "people_entry": false,
- "github_name": null,
- "prs": 114,
- "commits": 1398,
- "lines_added": 165335,
- "lines_deleted": 13057,
- "binary_added": 0,
- "binary_deleted": 0,
- "first_commit": "2026-10-12T21:57:44Z",
- "last_commit": "2026-10-17T22:37:46Z"
- },
- {
- "login": "deunderscorepaul",
- "people_entry": false,
- "github_name": null,
- "prs": 19,
- "commits": 65,
- "lines_added": 10665,
- "lines_deleted": 541,
- "binary_added": 0,
- "binary_deleted": 0,
- "first_commit": "2026-10-12T19:30:47Z",
- "last_commit": "2026-10-17T21:26:16Z"
- },
- {
- "login": "endthestart",
- "people_entry": false,
- "github_name": null,
- "prs": 17,
- "commits": 31,
- "lines_added": 2704,
- "lines_deleted": 288,
- "binary_added": 0,
- "binary_deleted": 0,
- "first_commit": "2026-10-15T04:01:23Z",
- "last_commit": "2026-10-17T21:26:16Z"
- },
- {
- "login": "clydecbrown",
- "people_entry": false,
- "github_name": null,
- "prs": 8,
- "commits": 41,
- "lines_added": 5679,
- "lines_deleted": 642,
- "binary_added": 0,
- "binary_deleted": 0,
- "first_commit": "2026-10-16T02:16:49Z",
- "last_commit": "2026-10-17T21:53:13Z"
- },
- {
- "login": "Kaan88",
- "people_entry": false,
- "github_name": null,
- "prs": 2,
- "commits": 3,
- "lines_added": 147,
- "lines_deleted": 3,
- "binary_added": 0,
- "binary_deleted": 0,
- "first_commit": "2026-10-16T20:59:17Z",
- "last_commit": "2026-10-17T10:52:59Z"
- }
- ],
- "models": [
- {
- "id": "anthropic/claude-opus/5.5",
- "company": "Anthropic",
- "model": "Claude Opus",
- "version": "5.5",
- "commits": 700,
- "lines_added": 0,
- "lines_deleted": 0
- },
- {
- "id": "anthropic/claude-haiku/5.5",
- "company": "Anthropic",
- "model": "Claude Haiku",
- "version": "5.5",
- "commits": 1,
- "lines_added": 0,
- "lines_deleted": 0
- }
- ]
-}
diff --git a/contributors/fork-contributors.py b/contributors/fork-contributors.py
deleted file mode 100644
index 02c786c651..0000000000
--- a/contributors/fork-contributors.py
+++ /dev/null
@@ -1,111 +0,0 @@
-#!/usr/bin/env python3
-"""Writes contributors/contributors.json from the pull requests opened on this repository only.
-
-Upstream's contributors are not listed one by one; the About window credits them in one line.
-A person is listed when a pull request of theirs here was merged, or was landed for them by a
-maintainer's `land/` or `bundle/-` pull request (whose body names it as `#n`). The
-landing pull request itself counts for nobody, so the work is credited once, to its author.
-Model credits come from the `Co-Authored-By:` lines of this repository's own commits (not
-upstream's).
-
-Usage: python3 contributors/fork-contributors.py (needs `gh` signed in, and the `upstream`
-remote fetched, run from the repository root)
-"""
-import json
-import pathlib
-import re
-import subprocess
-import tomllib
-
-REPO = "emmertex/lightcraft-classic"
-BOTS = {"dependabot", "github-actions", "renovate"}
-FIELDS = "number,author,state,headRefName,body,additions,deletions,createdAt,mergedAt,closedAt"
-
-
-def gh(*args):
- return json.loads(subprocess.run(["gh", *args], check=True, capture_output=True, text=True, encoding="utf-8").stdout)
-
-
-def git(*args):
- return subprocess.run(["git", *args], check=True, capture_output=True, text=True, encoding="utf-8").stdout
-
-
-def main():
- root = pathlib.Path(__file__).resolve().parent.parent
- prs = gh("pr", "list", "--repo", REPO, "--state", "all", "--limit", "5000", "--json", FIELDS)
- landing = [p for p in prs if p["state"] == "MERGED" and re.match(r"(land|bundle)/", p["headRefName"])]
- landed = {int(n) for p in landing for n in re.findall(r"#(\d+)", p["body"] or "")}
- landing_numbers = {p["number"] for p in landing}
-
- people = {}
- for p in prs:
- login = (p.get("author") or {}).get("login") or ""
- if not login or login.removesuffix("[bot]") in BOTS or p["number"] in landing_numbers:
- continue
- if not (p["state"] == "MERGED" or (p["state"] == "CLOSED" and p["number"] in landed)):
- continue
- c = people.setdefault(login, {"login": login, "prs": 0, "commits": 0, "lines_added": 0, "lines_deleted": 0, "dates": []})
- c["prs"] += 1
- # (the commit count per pull request: the list query can't carry it, GitHub's node limit)
- c["commits"] += int(subprocess.run(["gh", "api", f"repos/{REPO}/pulls/{p['number']}", "--jq", ".commits"], check=True, capture_output=True, text=True).stdout.strip() or 0)
- c["lines_added"] += p["additions"]
- c["lines_deleted"] += p["deletions"]
- c["dates"] += [d for d in (p["createdAt"], p["mergedAt"] or p["closedAt"]) if d]
-
- with open(root / "contributors" / "people.toml", "rb") as f:
- entries = tomllib.load(f).get("people", {})
- rows = []
- for c in sorted(people.values(), key=lambda c: (-c["prs"], c["login"].lower())):
- dates = sorted(c.pop("dates"))
- rows.append({
- "login": c["login"],
- "people_entry": c["login"] in entries,
- "github_name": None,
- "prs": c["prs"],
- "commits": c["commits"],
- "lines_added": c["lines_added"],
- "lines_deleted": c["lines_deleted"],
- "binary_added": 0,
- "binary_deleted": 0,
- "first_commit": dates[0] if dates else "",
- "last_commit": dates[-1] if dates else "",
- })
-
- # model credits: this repository's own commits (on main, not reachable from upstream)
- log = git("-C", str(root), "log", "--no-merges", "--format=%H%x00%B%x01", "upstream/main..origin/main")
- models = {}
- for entry in log.split("\x01"):
- body = entry.partition("\x00")[2]
- seen = set()
- for name in re.findall(r"(?im)^co-authored-by:\s*(Claude[^<]*?)\s*<[^>]*anthropic\.com>", body):
- m = re.match(r"Claude(?:\s+(\w+))?(?:\s+([\d.]+))?", name.strip())
- family, version = (m.group(1) or "", m.group(2) or "") if m else ("", "")
- key = (f"Claude {family}".strip(), version)
- if key not in seen:
- seen.add(key)
- models[key] = models.get(key, 0) + 1
- commits = sum(1 for e in log.split("\x01") if e.strip())
- model_rows = [
- {"id": f"anthropic/{m.lower().replace(' ', '-')}/{v}".rstrip("/"), "company": "Anthropic", "model": m, "version": v,
- "commits": n, "lines_added": 0, "lines_deleted": 0}
- for (m, v), n in sorted(models.items(), key=lambda kv: -kv[1])
- ]
-
- head = git("-C", str(root), "rev-parse", "origin/main").strip()
- out = {
- "schema": 1,
- "repo": REPO,
- "branch": "main",
- "head": head,
- "head_date": git("-C", str(root), "show", "-s", "--format=%cI", head).strip(),
- "commits": commits,
- "unattributed_commits": 0,
- "contributors": rows,
- "models": model_rows,
- }
- (root / "contributors" / "contributors.json").write_text(json.dumps(out, indent=2, ensure_ascii=False) + "\n", encoding="utf-8", newline="\n")
- print(f"{len(rows)} contributors, {len(model_rows)} models, {commits} fork commits")
-
-
-if __name__ == "__main__":
- main()
diff --git a/contributors/people.toml b/contributors/people.toml
deleted file mode 100644
index 6460e7def0..0000000000
--- a/contributors/people.toml
+++ /dev/null
@@ -1,87 +0,0 @@
-# Contributor names for the About window (docs/contributors.md; rules in AGENTS.md).
-#
-# Everyone who contributes is credited by GitHub username automatically. Anything more is up to
-# you: add YOUR OWN entry below, in your own PR (commit it yourself). Never add someone else; a
-# maintainer may add a person only when that person asked, recording where in consent_source.
-#
-#
-# Or copy this block, replacing your-github-username (every field is optional):
-#
-# [people.your-github-username]
-# real_name = "Your Name" # shown when the viewer picks "Real name"
-# display_name = "Nickname" # shown when the viewer picks "Display name"
-# sync_github_name = true # or: use the name on your public GitHub profile as display name
-#
-# To remove your names, delete your entry (or set fields empty) in a PR. The next
-# contributors.py run, and the next build, drop them.
-
-[people.echelon]
-real_name = "Brandon Thomas"
-display_name = "Brandon Thomas"
-sync_github_name = false
-
-[people.rock-meister]
-sync_github_name = true
-
-[people.Th4nat0s]
-display_name = "Thanat0s"
-
-[people.sanyamsingh001]
-display_name = "sanyamsingh001"
-
-[people.ArekatlaNishanthchowdary]
-real_name = "Arekatla Nishanth Chowdary"
-sync_github_name = true
-
-[people.Losminek]
-sync_github_name = true
-
-[people.nicolasfalesy]
-sync_github_name = true
-
-[people.FooVoo]
-real_name = "Aleksandr Batyrev"
-sync_github_name = true
-
-[people.Silvertree2010]
-display_name = "Netter"
-sync_github_name = false
-
-[people.nledford]
-real_name = "Nathaniel Ledford"
-
-[people.marcoarnulfo]
-real_name = "Marco Arnulfo"
-display_name = "Marco Arnulfo"
-sync_github_name = false
-
-[people.egegl]
-real_name = "Ege Gursel"
-sync_github_name = true
-
-[people.valenfys]
-sync_github_name = true
-
-[people.mahmatias]
-display_name = "Márcio Matias de Andrade"
-sync_github_name = true
-
-[people.ronibalthazar]
-sync_github_name = true
-
-[people.Kaan88]
-sync_github_name = true
-
-
-[people.esli1283]
-real_name = "Aaron Lopez"
-sync_github_name = false
-
-[people.dotCooCoo]
-real_name = "Robert Lee"
-
-[people.samuelili]
-real_name = "Samuel Li"
-
-[people.hayone1]
-sync_github_name = true
diff --git a/crates/camdb/data/calibrations/README.md b/crates/camdb/data/calibrations/README.md
index 7778f50cce..bff35b96fc 100644
--- a/crates/camdb/data/calibrations/README.md
+++ b/crates/camdb/data/calibrations/README.md
@@ -3,13 +3,13 @@
One JSON file per camera model, lens and editor (`_.json` for Lightroom, `__.json` for
Capture One, darktable, RawTherapee or DxO PhotoLab; `__[_].json` for a fit made for one
lens, `--lens`), embedded into the crate at build time by `build.rs`. Each holds
-the camera's colour model and named looks, fitted black-box by ` calibrate-lightroom fit [--editor ID]` to that
+the camera's colour model and named looks, fitted black-box by `chromaforge-cli calibrate-lightroom fit [--editor ID]` to that
editor's exports of a contributor's own photos (aggregate statistics only: no image content, file names, dates, serial
numbers or locations; a lens-specific fit records the lens model identifier only). A photo uses its lens's
calibration when there is one, else the lens-less one, never another lens's. The format and its checks are in `src/calibration.rs`; how contributors make one is in
[`docs/calibrate-lightroom.md`](../../../../docs/calibrate-lightroom.md).
-Files are added only with ` calibrate-lightroom add FILE`, which validates the contribution, writes it here in
+Files are added only with `chromaforge-cli calibrate-lightroom add FILE`, which validates the contribution, writes it here in
the canonical form and adds its row to `assets/ATTRIBUTION.md`; it refuses to overwrite a file for the same camera, lens and editor unless
`--replace`.
diff --git a/crates/camdb/data/cameras/README.md b/crates/camdb/data/cameras/README.md
index 15741549fe..285ec54387 100644
--- a/crates/camdb/data/cameras/README.md
+++ b/crates/camdb/data/cameras/README.md
@@ -1,7 +1,7 @@
# Camera data
One TOML file per maker (`.toml`), embedded into the crate at build time by `build.rs`. The format and the
-provenance rules are in the crate documentation (`src/lib.rs`); ` camdb extract` prints entries from DNGs the
+provenance rules are in the crate documentation (`src/lib.rs`); `chromaforge-cli camdb extract` prints entries from DNGs the
camera itself wrote.
This folder stays in the repository even while it holds no camera file: the build script watches it, and a watched
diff --git a/crates/camprof/Cargo.toml b/crates/camprof/Cargo.toml
index 4868c97af7..ac56ceeba4 100644
--- a/crates/camprof/Cargo.toml
+++ b/crates/camprof/Cargo.toml
@@ -2,7 +2,9 @@
name = "lcc-camprof"
version.workspace = true
edition.workspace = true
-license = "MIT OR Apache-2.0 OR GPL-3.0-or-later"
+# Project distribution is GPL-3.0-or-later; the ported RADcamProfiles files keep their MIT/Apache
+# notices (NOTICE), so the crate also carries those original options.
+license = "GPL-3.0-or-later OR MIT OR Apache-2.0"
description = "Camera profiling from a ColorChecker photograph (L1; the RADcamProfiles engine)"
authors = ["RAD Films - Roman Alurkoff"]
diff --git a/crates/catalog/src/dates.rs b/crates/catalog/src/dates.rs
index 3e4dfff73b..f4a9ca3edf 100644
--- a/crates/catalog/src/dates.rs
+++ b/crates/catalog/src/dates.rs
@@ -172,6 +172,26 @@ pub fn capture_start(c: &str) -> std::borrow::Cow<'_, str> {
}
}
+/// Whether `s` is a valid calendar prefix (`YYYY`, `YYYY-MM` or `YYYY-MM-DD`).
+pub fn valid_date_prefix(s: &str) -> bool {
+ let part = |range: std::ops::Range| -> Option {
+ let sub = s.get(range)?;
+ sub.bytes().all(|c| c.is_ascii_digit()).then(|| sub.parse().ok()).flatten()
+ };
+ match s.len() {
+ 4 => part(0..4).is_some(),
+ 7 if s.as_bytes().get(4) == Some(&b'-') => {
+ let (Some(y), Some(m)) = (part(0..4), part(5..7)) else { return false };
+ chrono::NaiveDate::from_ymd_opt(y as i32, m, 1).is_some()
+ }
+ 10 if s.as_bytes().get(4) == Some(&b'-') && s.as_bytes().get(7) == Some(&b'-') => {
+ let (Some(y), Some(m), Some(d)) = (part(0..4), part(5..7), part(8..10)) else { return false };
+ chrono::NaiveDate::from_ymd_opt(y as i32, m, d).is_some()
+ }
+ _ => false,
+ }
+}
+
/// Whether the library can hold `c` as a capture time: a time [`iso_seconds`] reads, or a
/// [`partial_capture`]. (`Op::SetCaptured` refuses anything else.)
pub fn is_capture_time(c: &str) -> bool {
@@ -849,4 +869,15 @@ mod tests {
}
assert!(c.auto_stack_groups(&ids, 60.0).is_empty());
}
+
+ #[test]
+ fn valid_date_prefix_checks_calendar_and_shape() {
+ for ok in ["2026", "0000", "2026-01", "2026-12", "2026-11-30", "2024-02-29"] {
+ assert!(valid_date_prefix(ok), "{ok}");
+ }
+ for bad in ["", "202", "20265", "20x6", "é202", "2026-00", "2026-13", "2026/05", "2025-02-29", "2026-02-30", "2026-1-1", "2026-11-30T10:00"]
+ {
+ assert!(!valid_date_prefix(bad), "{bad}");
+ }
+ }
}
diff --git a/crates/catalog/src/db.rs b/crates/catalog/src/db.rs
index c879fcead3..d0dd233f72 100644
--- a/crates/catalog/src/db.rs
+++ b/crates/catalog/src/db.rs
@@ -11,7 +11,7 @@
//!
//! | table | key → value |
//! |---|---|
-//! | `meta` | `format`, `version`, `seq`, `head` (ids counters, label names, browse times) |
+//! | `meta` | `format`, `version`, `seq`, `head` (ids counters, label names, browse times, the folders' records: colour labels and Custom Orders) |
//! | `photos` | photo id → photo JSON, develop settings as references ([`crate::settings_ref`]) |
//! | `develop_settings` | settings hash → settings JSON (develop, History steps, Versions; shared) |
//! | `collections` | album id → album JSON (albums, smart albums, folders of albums) |
@@ -84,7 +84,8 @@ struct Head {
/// Keywords listed on their own or given attributes (format version 5).
#[serde(default, skip_serializing_if = "BTreeMap::is_empty")]
keyword_list: BTreeMap,
- /// What the library keeps about its folders (format version 5).
+ /// What the library keeps about its folders (format version 5): colour labels, and from
+ /// format version 23 the Custom Order of each folder's photos, which can run to many ids.
#[serde(default, skip_serializing_if = "BTreeMap::is_empty")]
folder_records: BTreeMap,
/// The Map module's saved locations (format version 6).
diff --git a/crates/catalog/src/facets.rs b/crates/catalog/src/facets.rs
index d99ae52f1b..cffccc9c0c 100644
--- a/crates/catalog/src/facets.rs
+++ b/crates/catalog/src/facets.rs
@@ -69,11 +69,31 @@ impl FacetPick {
if self.is_empty() {
return true;
}
- let have = values(p, cat, &self.field);
+ let have = pick_tokens(p, cat, &self.field);
(self.none && have.is_empty()) || have.iter().any(|h| self.values.iter().any(|v| v.eq_ignore_ascii_case(h)))
}
}
+/// What a column pick on `field` is matched against: [`values`], except that a Date pick matches by prefix at any
+/// level (the capture time as `YYYY`, `YYYY-MM` and `YYYY-MM-DD`) and a File Type pick also matches the photo's
+/// merged kind (`hdr`, `panorama`, `hdrPanorama`, `focusStack`, as the Type menu lists them). `values` itself is
+/// what `library.facets` counts, so it stays as it is.
+fn pick_tokens(p: &Photo, cat: &Catalog, field: &str) -> Vec {
+ match field {
+ "year" => {
+ let Some(c) = p.captured.as_deref().filter(|c| !c.trim().is_empty()) else { return Vec::new() };
+ let start = crate::dates::capture_start(c);
+ [4, 7, 10].into_iter().filter_map(|n| start.get(..n)).map(str::to_string).collect()
+ }
+ "kind" => {
+ let mut v = values(p, cat, field);
+ v.extend(crate::query::merged_kind(&p.file_name).map(str::to_string));
+ v
+ }
+ _ => values(p, cat, field),
+ }
+}
+
pub fn flag_name(f: Flag) -> &'static str {
match f {
Flag::Pick => "pick",
@@ -147,6 +167,11 @@ pub fn shutter_label(secs: f64) -> Option {
lcc_meta::format_exposure_time(secs).map(|text| format!("{text} s"))
}
+/// Whether `field`'s values list by their number rather than by their text.
+pub fn is_numeric(field: &str) -> bool {
+ matches!(field, "rating" | "year" | "iso" | "focal" | "aperture" | "shutter" | "faces")
+}
+
/// The number a numeric Metadata column's value sorts by: the value itself, an aperture's f-number, a
/// shutter speed's seconds. `None` when it isn't one.
pub fn sort_key(field: &str, value: &str) -> Option {
diff --git a/crates/catalog/src/folders.rs b/crates/catalog/src/folders.rs
index 0aa51bdf2d..b5118e52b1 100644
--- a/crates/catalog/src/folders.rs
+++ b/crates/catalog/src/folders.rs
@@ -24,11 +24,11 @@
//! two rows. Each row is still consistent: choosing it shows exactly the photos it counts.
//!
//! A folder is otherwise only where photos are, but the library can also keep a
-//! [`FolderRecord`] about it (its colour label), stored under the folder's identity
-//! ([`crate::query::folder_key`]). A record follows its folder when the folder is renamed or moved
-//! here ([`Catalog::folder_records_follow`]), or found again somewhere else on disk
-//! ([`Catalog::folder_records_relocate`]); one about a folder that no longer holds a photo is
-//! kept (undo can bring the photos back) and shows again when the folder does.
+//! [`FolderRecord`] about it (its colour label, and the Custom Order of its photos), stored under
+//! the folder's identity ([`crate::query::folder_key`]). A record follows its folder when the
+//! folder is renamed or moved here ([`Catalog::folder_records_follow`]), or found again somewhere
+//! else on disk ([`Catalog::folder_records_relocate`]); one about a folder that no longer holds a
+//! photo is kept (undo can bring the photos back) and shows again when the folder does.
//!
//! This is the library's own view of its photos; browsing any folder on disk without importing
//! is Local's job (see [`crate::local`]).
@@ -38,7 +38,7 @@ use std::collections::{BTreeMap, HashMap};
use serde::{Deserialize, Serialize};
use crate::query::{folder_key, folder_rest, folder_within, key_within, photo_in_root, split_path};
-use crate::{Catalog, ColorLabel, Op, Source};
+use crate::{Catalog, ColorLabel, Op, PhotoId, Source};
/// Folder levels kept per photo. No real path comes near it; a deeper one is counted at its
/// ancestor this many levels down, which bounds the tree's depth (and so every walk of it)
@@ -78,15 +78,29 @@ pub struct FolderRecord {
/// A colour label, as a photo has one.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub label: Option,
+ /// The folder's Custom Order (issue #1583): its photos in the order the user set by hand
+ /// ([`crate::SortKey::Custom`], format version 23). Only the photos directly in the folder
+ /// count; the ones the order doesn't list follow. A photo taken out of the folder is left out
+ /// while it is away and finds its place again when it comes back, until the order is saved
+ /// anew without it. Read it through [`Catalog::folder_photo_order`], which leaves out what the
+ /// folder no longer holds. Empty: no custom order yet.
+ #[serde(default, skip_serializing_if = "Vec::is_empty")]
+ pub photo_order: Vec,
}
impl FolderRecord {
/// Whether the record says nothing (and so is not kept).
pub fn is_empty(&self) -> bool {
- self.label.is_none()
+ self.label.is_none() && self.photo_order.is_empty()
}
}
+/// Whether `path` names a folder whose photos can be put in Custom Order: any absolute folder,
+/// however it is spelled; not `.`, a relative path or nothing.
+pub fn folder_has_custom_order(path: &str) -> bool {
+ record_key(path).is_some()
+}
+
/// The identity a folder's record is kept under: its [`folder_key`]; `None` for a path that
/// names no folder (empty, relative, `.`).
pub(crate) fn record_key(path: &str) -> Option {
@@ -512,6 +526,24 @@ impl Catalog {
Op::SetFolderRecord { folder: path.to_string(), record: Some(record) }
}
+ /// The op that puts the photos of folder `path` in the Custom Order `order` (see
+ /// [`FolderRecord::photo_order`]; empty clears it), keeping the rest of its record. Applying
+ /// it checks the path.
+ pub fn folder_photo_order_op(&self, path: &str, order: Vec) -> Op {
+ let mut record = self.folder_record(path).cloned().unwrap_or_default();
+ record.photo_order = order;
+ Op::SetFolderRecord { folder: path.to_string(), record: Some(record) }
+ }
+
+ /// Whether a view of the library folder `path` is sorted by the folder's Custom Order
+ /// ([`crate::SortKey::Custom`]): one shown without the photos of the folders inside it
+ /// (`subfolders` false), or one holding no photo below it — the view is the folder's own photos
+ /// either way. With the photos of the folders inside it shown as well there is no one order to
+ /// go by. `false` for a path that names no folder.
+ pub fn folder_view_has_custom_order(&self, path: &str, subfolders: bool) -> bool {
+ record_key(path).is_some_and(|root| !subfolders || !self.holds_photos_below(&root))
+ }
+
/// The ops that carry the records of folder `from` and the folders inside it over to `to`
/// (the same place below it), for a folder renamed or moved on disk: commit them with the
/// photos' relinks so undo puts both back. Records already at or below `to` are left from a
diff --git a/crates/catalog/src/index.rs b/crates/catalog/src/index.rs
index d94b4125ce..ce072c7090 100644
--- a/crates/catalog/src/index.rs
+++ b/crates/catalog/src/index.rs
@@ -14,6 +14,7 @@
use std::collections::{HashMap, HashSet};
use std::sync::OnceLock;
+use crate::query::{photo_directly_in, photo_in_root};
use crate::{AlbumId, Catalog, Op, Photo, PhotoId, Source, StackId};
#[derive(Default)]
@@ -366,6 +367,24 @@ impl Catalog {
sorted(self.index.folders.get_or_init(|| self.file_index(photo_folder_index_key)).get(folder_key))
}
+ /// Whether the library holds a photo in a folder inside the folder whose identity
+ /// ([`crate::query::folder_key`]) is `root`, not directly in it. Read from the folder index: a
+ /// look at each folder the catalog knows, then at the photos in the ones inside `root` until one
+ /// counts. Photos in Recently Deleted or only browsed in Local don't (a folder is never shown
+ /// with them), and each candidate is asked about its own path: the index groups folders without
+ /// regard to letter case.
+ pub(crate) fn holds_photos_below(&self, root: &str) -> bool {
+ let lower = root.to_lowercase();
+ let own = lower.trim_end_matches('/');
+ self.index
+ .folders
+ .get_or_init(|| self.file_index(photo_folder_index_key))
+ .iter()
+ .filter(|(k, _)| crate::query::key_within(k, &lower) && k.trim_end_matches('/') != own)
+ .flat_map(|(_, ids)| ids)
+ .any(|id| self.photos.get(id).is_some_and(|p| p.in_library() && photo_in_root(p, root) && !photo_directly_in(p, root)))
+ }
+
/// The photos whose file is named `name_lower` (lower-cased, as [`file_name_index_key`] gives),
/// whatever their state, sorted by id. Callers compare exact names themselves.
pub fn photos_named_any_case(&self, name_lower: &str) -> Vec {
diff --git a/crates/catalog/src/journal.rs b/crates/catalog/src/journal.rs
index 56a57c0ea6..3e87738dd2 100644
--- a/crates/catalog/src/journal.rs
+++ b/crates/catalog/src/journal.rs
@@ -69,6 +69,8 @@
//! | 20 | Image Quality Scanner scores (issue #1313) | `Analysis.quality` (`QualityScan`: sharpness, noise, exposure, compression, score, verdict, the flag a scan wrote) |
//! | 21 | the Image Quality Scanner assigns star ratings (issue #1362) | `QualityScan.rating_written` |
//! | 22 | Pixel Shift merges remember how they were made (registered or plain, the hold-out verdict, why plain) | `MergeSources.registration` (`MergeRegistration`) |
+//! | 23 | Custom Order in folders (issue #1583): the order set by hand for the photos of one folder of the library | `FolderRecord.photo_order` |
+//! | 24 | Raw + JPEG companions: a JPEG beside its raw imports as the raw's companion, not a photo of its own (issue #1692) | `Op::SetCompanion`, `Photo.companion_jpeg` |
//!
//! Rules:
//! - **Bump [`VERSION`]** (and add a row above) in the change that adds an [`Op`] variant or a
@@ -101,7 +103,7 @@ pub(crate) const FORMAT: &str = "lcc-catalog";
pub(crate) const V4_FORMAT: &str = "lcc-catalog-db";
/// The catalog format this build writes (and the newest it reads). See the module docs →
/// *Format versions*; bump it whenever an [`Op`] variant or a serialized field is added.
-pub const VERSION: u32 = 22;
+pub const VERSION: u32 = 24;
/// When [`Journal::wants_snapshot`] says it's time to compact the log.
#[derive(Clone, Copy, Debug)]
diff --git a/crates/catalog/src/lib.rs b/crates/catalog/src/lib.rs
index 4428a30d1e..59c07b2315 100644
--- a/crates/catalog/src/lib.rs
+++ b/crates/catalog/src/lib.rs
@@ -66,7 +66,7 @@ use lcc_develop::DevelopSettings;
pub use local::{DEFAULT_FORGET_DAYS, ForgetPlan, LocalRecords, folder_of};
pub use lock::{LibraryLock, LockError, LockOwner};
pub use model::*;
-pub use query::{DateGroup, Filter, MatchOp, Person, RatingOp, Sort, SortKey, Tally, mix64};
+pub use query::{DateGroup, Filter, MatchOp, Person, RatingOp, Sort, SortKey, Tally, date_groups_from, mix64};
pub use remote::{PreviewEntry, RemoteIdentity, RemoteKey, RemoteTable, SyncState};
pub use rules::{Match, Rule, RuleSet};
use serde::{Deserialize, Serialize};
@@ -183,6 +183,14 @@ pub enum Op {
#[serde(default)]
sources: Option>,
},
+ /// Which JPEG file is the raw's companion (see [`Photo::companion_jpeg`]; `None`: none, or
+ /// cleared). Set by an import that found the pair, and by a rename that took the companion
+ /// along. Format version 23.
+ SetCompanion {
+ id: PhotoId,
+ #[serde(default)]
+ companion: Option,
+ },
/// Move the History cursor (see [`Photo::history_cursor`]) without changing the steps.
SetHistoryCursor {
id: PhotoId,
@@ -977,9 +985,12 @@ impl Catalog {
Op::SetLabel { .. } => self.changes.now = Aspects::LABEL,
Op::SetMeta { .. } | Op::SetXmpStamp { .. } => self.changes.now = Aspects::META,
Op::SetCaptured { .. } => self.changes.now = Aspects::CAPTURED,
- Op::SetFile { .. } | Op::Relink { .. } | Op::SetSha1 { .. } | Op::SetExported { .. } | Op::SetMergeSources { .. } => {
- self.changes.now = Aspects::FILE
- }
+ Op::SetFile { .. }
+ | Op::Relink { .. }
+ | Op::SetSha1 { .. }
+ | Op::SetExported { .. }
+ | Op::SetMergeSources { .. }
+ | Op::SetCompanion { .. } => self.changes.now = Aspects::FILE,
Op::SetAnalysis { .. } => self.changes.now = Aspects::ANALYSIS,
Op::SetDevelop { .. }
| Op::SetVersions { .. }
@@ -1156,6 +1167,10 @@ impl Catalog {
let p = self.photo_mut(id)?;
Op::SetMergeSources { id, sources: std::mem::replace(&mut p.merge_sources, sources) }
}
+ Op::SetCompanion { id, companion } => {
+ let p = self.photo_mut(id)?;
+ Op::SetCompanion { id, companion: std::mem::replace(&mut p.companion_jpeg, companion) }
+ }
Op::SetHistoryCursor { id, cursor } => {
let p = self.photo_mut(id)?;
Op::SetHistoryCursor { id, cursor: std::mem::replace(&mut p.history_cursor, cursor) }
@@ -1769,6 +1784,7 @@ fn changes_what_albums_test(op: &Op) -> bool {
| Op::SetCaptured { .. }
| Op::SetFile { .. }
| Op::Relink { .. }
+ | Op::SetCompanion { .. }
| Op::SetAnalysis { .. }
| Op::SetDevelop { .. }
| Op::SetVersions { .. }
diff --git a/crates/catalog/src/library.rs b/crates/catalog/src/library.rs
index 323b89b736..75702f9732 100644
--- a/crates/catalog/src/library.rs
+++ b/crates/catalog/src/library.rs
@@ -672,7 +672,7 @@ impl BackupSchedule {
}
/// The catalog's own settings (`catalog-settings.json`).
-#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)]
+#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct CatalogSettings {
pub backup: BackupSchedule,
@@ -690,6 +690,11 @@ pub struct CatalogSettings {
pub test_integrity: bool,
/// Optimise after a backup.
pub optimize: bool,
+ /// Treat JPEGs next to raw files as companions of the raw (issue #1692): at import, a JPEG
+ /// with a raw's name beside it is not a photo of its own but the raw's companion (one
+ /// thumbnail, one face scan, one set of metadata). Unchecked, JPEGs import as separate
+ /// photos. As Lightroom Classic's default (its option is phrased the other way round).
+ pub raw_jpeg_companions: bool,
/// The preview store's settings (standard size, 1:1 discard, previews at import). Owned by
/// the engine (`library.previewSettings`); kept opaque here so the catalog needn't know them.
#[serde(skip_serializing_if = "Option::is_none")]
@@ -700,7 +705,32 @@ pub struct CatalogSettings {
pub library_id: Option,
}
+impl Default for CatalogSettings {
+ /// The defaults a library without a settings file (or without a field in it, via the serde
+ /// `default` on the container) stands in with. `raw_jpeg_companions` is on: JPEGs beside
+ /// raws are companions of the raw (issue #1692), as Lightroom Classic defaults to.
+ fn default() -> Self {
+ CatalogSettings { raw_jpeg_companions: true, ..CatalogSettings::empty() }
+ }
+}
+
impl CatalogSettings {
+ /// Every setting off/absent ([`Default`] turns the ones on that should be).
+ fn empty() -> Self {
+ CatalogSettings {
+ backup: BackupSchedule::default(),
+ backup_dir: None,
+ keep_backups: 0,
+ last_backup: None,
+ backup_mark: None,
+ test_integrity: false,
+ optimize: false,
+ previews: None,
+ library_id: None,
+ raw_jpeg_companions: false,
+ }
+ }
+
/// The settings in `dir`; [`CatalogSettings::new_library`] when there are none or the file
/// can't be used (logged). Changes nothing on disk: opening the library
/// ([`CatalogSettings::load_checked`]) is what moves a damaged file aside and tells the user,
@@ -717,7 +747,7 @@ impl CatalogSettings {
/// The settings a new library starts with: backups kept (10) and tested.
pub fn new_library() -> CatalogSettings {
- CatalogSettings { keep_backups: 10, test_integrity: true, ..CatalogSettings::default() }
+ CatalogSettings { keep_backups: 10, test_integrity: true, raw_jpeg_companions: true, ..CatalogSettings::default() }
}
/// The settings in `dir`, and what was wrong with its file, to tell the user. A missing file
diff --git a/crates/catalog/src/local.rs b/crates/catalog/src/local.rs
index ee840cb713..87d83c2b4b 100644
--- a/crates/catalog/src/local.rs
+++ b/crates/catalog/src/local.rs
@@ -346,6 +346,7 @@ impl Op {
| Op::SetBefore { id, .. }
| Op::SetExported { id, .. }
| Op::SetMergeSources { id, .. }
+ | Op::SetCompanion { id, .. }
| Op::SetCaptured { id, .. }
| Op::SetAnalysis { id, .. }
| Op::SetFile { id, .. }
diff --git a/crates/catalog/src/model.rs b/crates/catalog/src/model.rs
index ad018ea85b..8853c90ca6 100644
--- a/crates/catalog/src/model.rs
+++ b/crates/catalog/src/model.rs
@@ -377,6 +377,13 @@ pub struct Photo {
/// Hash of the file's bytes (hex), for duplicate detection and preview-cache keys.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub content_hash: Option,
+ /// A raw imported with "treat JPEGs next to raw files as companions" (issue #1692): the JPEG
+ /// twin the import found beside it (same name, same folder). The companion is not a photo of
+ /// its own — no separate thumbnail, no second face scan, one set of metadata (this photo's) —
+ /// and travels with the raw through Copy / Move and Rename. `None` for every other photo.
+ /// Catalog format 24.
+ #[serde(default, skip_serializing_if = "Option::is_none")]
+ pub companion_jpeg: Option,
/// Lens corrections embedded in the file (DNG `WarpRectilinear` / `FixVignetteRadial`), applied when
/// "Enable Profile Corrections" is on.
#[serde(default, skip_serializing_if = "Option::is_none")]
@@ -746,6 +753,7 @@ impl Photo {
duration: None,
as_shot_wb: None,
content_hash: None,
+ companion_jpeg: None,
embedded_lens: None,
copy_of: None,
copy_name: None,
diff --git a/crates/catalog/src/query.rs b/crates/catalog/src/query.rs
index 43afc53505..a1c624b637 100644
--- a/crates/catalog/src/query.rs
+++ b/crates/catalog/src/query.rs
@@ -159,8 +159,10 @@ pub enum SortKey {
/// A shuffle fixed by [`Sort::seed`]: the same seed always gives the same order, and photos
/// added or edited later never reshuffle the others. Pick a new seed to reshuffle.
Random,
- /// Custom Order: the order set by hand in a regular album ([`Catalog::album_photo_order`]).
- /// Anywhere else (no album, a smart album) it sorts by capture date.
+ /// Custom Order: the order set by hand in a regular album ([`Catalog::album_photo_order`]) or
+ /// in one folder of the library shown as its own photos ([`Catalog::folder_photo_order`];
+ /// [`Catalog::folder_view_has_custom_order`]). Anywhere else (no album, a smart album, a
+ /// folder shown with the photos of the folders inside it) it sorts by capture date.
Custom,
/// The Image Quality Scanner's score (issue #1313): photos it has not scored go first in
/// ascending order (and last descending), as they carry no number to sort by.
@@ -190,8 +192,8 @@ impl Sort {
/// Which of two photos comes first in this order: the order [`Catalog::query`] gives (never `Equal` for two
/// photos: the id decides last). Photos that tie on the key (one import batch, a burst within a second,
/// equal ratings) go by file name, the order cameras number frames, so the order doesn't depend on how ids
- /// were given out. [`SortKey::Custom`] orders as the capture date here, as it does where there is no album's
- /// own order; an album's Custom Order is the album's, not the photos'.
+ /// were given out. [`SortKey::Custom`] orders as the capture date here, as it does where there is no album's or
+ /// folder's own order; a Custom Order is the album's or the folder's, not the photos'.
pub fn order(&self, a: &Photo, b: &Photo) -> std::cmp::Ordering {
let o = match self.key {
SortKey::CaptureDate | SortKey::Custom => a.captured.as_deref().cmp(&b.captured.as_deref()).then_with(|| a.imported.cmp(&b.imported)),
@@ -927,6 +929,8 @@ impl Filter {
label: None,
labels: Vec::new(),
labels_none: false,
+ // a Rating column choice of several ratings is a quick filter too
+ facets: self.facets.iter().filter(|p| p.field != "rating").cloned().collect(),
..self.clone()
}
}
@@ -1297,6 +1301,40 @@ pub fn cmp_name(a: &str, b: &str) -> std::cmp::Ordering {
a.chars().flat_map(char::to_lowercase).cmp(b.chars().flat_map(char::to_lowercase))
}
+/// Year → month → day counts for `photos` (newest first).
+pub fn date_groups_from<'a>(photos: impl IntoIterator
- ) -> Vec {
+ use std::borrow::Cow;
+ use std::collections::BTreeMap;
+ let mut years: BTreeMap, (BTreeMap, usize>, BTreeMap, usize>)> = BTreeMap::new();
+ for p in photos {
+ let Some(d) = p.captured.as_deref().map(crate::dates::capture_start) else { continue };
+ // `get`, not `[..]`: a corrupt or foreign `captured` (a Lightroom catalog's
+ // captureTime is copied verbatim) may not be ASCII, and slicing it on a byte index
+ // would panic. A partial time (`1983-04`) counts at the start of its period, so only
+ // it owns its keys.
+ let part = |n: usize| match &d {
+ Cow::Borrowed(d) => d.get(..n).map(Cow::Borrowed),
+ Cow::Owned(d) => d.get(..n).map(|k| Cow::Owned(k.to_string())),
+ };
+ if let (Some(year), Some(month), Some(day)) = (part(4), part(7), part(10)) {
+ let (months, days) = years.entry(year).or_default();
+ *months.entry(month).or_default() += 1;
+ *days.entry(day).or_default() += 1;
+ }
+ }
+ let newest_first = |m: BTreeMap, usize>| m.into_iter().rev().map(|(k, n)| (k.to_string(), n)).collect::>();
+ years
+ .into_iter()
+ .rev()
+ .map(|(year, (months, days))| DateGroup {
+ year: year.to_string(),
+ count: months.values().sum(),
+ months: newest_first(months),
+ days: newest_first(days),
+ })
+ .collect()
+}
+
impl Catalog {
/// Photos matching `filter`, in `sort` order (ties broken by file name, then id).
pub fn query(&self, filter: &Filter, sort: &Sort) -> Vec {
@@ -1317,8 +1355,8 @@ impl Catalog {
/// touched photo that was in the list and still matches `within` stays, as `query_keeping` would keep it. What
/// the query would give, without asking every photo again.
pub fn follow(&self, was: &[PhotoId], touched: &[PhotoId], filter: &Filter, sort: &Sort, within: Option<&Filter>) -> Vec {
- if sort.key == SortKey::Custom && filter.album.is_some_and(|a| self.has_custom_order(a)) {
- // an album's own order is the album's, not the photos': asked whole, keeping what the list held (the
+ if sort.key == SortKey::Custom && (filter.album.is_some_and(|a| self.has_custom_order(a)) || self.custom_order_folder(filter).is_some()) {
+ // an album's or a folder's own order is not the photos': asked whole, keeping what the list held (the
// untouched photos still match what they matched, or the ops would not have been followed)
let keep: std::collections::HashSet = was.iter().copied().collect();
return self.query_keeping(filter, sort, &keep, within.unwrap_or(filter));
@@ -1421,7 +1459,29 @@ impl Catalog {
}
return v.into_iter().map(|(_, id)| id).collect();
}
- // no regular album: by capture date
+ if let Some(root) = self.custom_order_folder(filter) {
+ // the folder's own order ranks its photos; the rest (new imports, a photo back in the folder)
+ // follow in the default order, in one pass with the filter
+ let saved = self.folder_saved_order(&root);
+ let rank: std::collections::HashMap = saved.iter().enumerate().map(|(i, p)| (*p, i)).collect();
+ let mut v: Vec<(usize, PhotoId)> = Vec::new();
+ let mut rest: Vec<&Photo> = Vec::new();
+ for p in self.photos().map(|p| p.as_ref()).filter(keep) {
+ match rank.get(&p.id) {
+ Some(r) => v.push((*r, p.id)),
+ None => rest.push(p),
+ }
+ }
+ let after = saved.len();
+ rest.sort_unstable_by(|a, b| Sort::default().order(a, b));
+ v.extend(rest.iter().enumerate().map(|(i, p)| (after + i, p.id)));
+ v.sort_unstable();
+ if !sort.ascending {
+ v.reverse();
+ }
+ return v.into_iter().map(|(_, id)| id).collect();
+ }
+ // no regular album, no folder of its own: by capture date
return self.query_inner(filter, &Sort { key: SortKey::CaptureDate, ..*sort }, cached, keeping);
}
let all: Vec<&Photo> = self.photos().map(|p| p.as_ref()).collect();
@@ -1457,6 +1517,14 @@ impl Catalog {
self.album(id).is_some_and(|a| !a.folder && a.smart.is_none())
}
+ /// The folder whose Custom Order sorts `filter`'s photos, if any: a library folder whose view
+ /// is its own photos only ([`Catalog::folder_view_has_custom_order`]), as its identity. A path
+ /// that names no folder, and a view with the photos of the folders inside it, have none.
+ pub(crate) fn custom_order_folder(&self, filter: &Filter) -> Option {
+ let root = filter.library_folder.as_deref().and_then(crate::folders::record_key)?;
+ self.folder_view_has_custom_order(&root, !filter.library_folder_only).then_some(root)
+ }
+
/// The album's photos in Custom Order: [`crate::Album::photo_order`] (members only), then the
/// photos it doesn't list in the order they were added. Empty for smart albums and folders.
pub fn album_photo_order(&self, id: AlbumId) -> Vec {
@@ -1468,40 +1536,40 @@ impl Catalog {
out
}
- /// Year → month → day counts for the "By Date" section (newest first).
- pub fn date_groups(&self) -> Vec {
- use std::borrow::Cow;
- use std::collections::BTreeMap;
- let mut years: BTreeMap, (BTreeMap, usize>, BTreeMap, usize>)> = BTreeMap::new();
- for p in self.photos().filter(|p| p.in_library()) {
- let Some(d) = p.captured.as_deref().map(crate::dates::capture_start) else { continue };
- // `get`, not `[..]`: a corrupt or foreign `captured` (a Lightroom catalog's
- // captureTime is copied verbatim) may not be ASCII, and slicing it on a byte index
- // would panic. A partial time (`1983-04`) counts at the start of its period, so only
- // it owns its keys.
- let part = |n: usize| match &d {
- Cow::Borrowed(d) => d.get(..n).map(Cow::Borrowed),
- Cow::Owned(d) => d.get(..n).map(|k| Cow::Owned(k.to_string())),
- };
- if let (Some(year), Some(month), Some(day)) = (part(4), part(7), part(10)) {
- let (months, days) = years.entry(year).or_default();
- *months.entry(month).or_default() += 1;
- *days.entry(day).or_default() += 1;
- }
- }
- let newest_first = |m: BTreeMap, usize>| m.into_iter().rev().map(|(k, n)| (k.to_string(), n)).collect::>();
- years
+ /// [`crate::FolderRecord::photo_order`] of the folder whose identity ([`folder_key`]) is
+ /// `root`, as far as it still goes: the photos the catalog has that are directly in the folder,
+ /// each once. Ones only browsed in Local are not the folder's; deleted ones still are (back
+ /// from Recently Deleted, a photo finds its place again).
+ pub(crate) fn folder_saved_order(&self, root: &str) -> Vec {
+ let mut seen = std::collections::HashSet::new();
+ self.folder_records
+ .get(root)
.into_iter()
- .rev()
- .map(|(year, (months, days))| DateGroup {
- year: year.to_string(),
- count: months.values().sum(),
- months: newest_first(months),
- days: newest_first(days),
- })
+ .flat_map(|r| r.photo_order.iter().copied())
+ .filter(|id| self.photo(*id).is_some_and(|p| !p.local && photo_directly_in(p, root)) && seen.insert(*id))
.collect()
}
+ /// The folder's photos in Custom Order (issue #1583): [`Self::folder_saved_order`] (the order
+ /// set by hand), then the photos directly in the folder it doesn't list, in [`Sort::default`]
+ /// order (capture date), so a photo imported later follows the others. Empty for a path that
+ /// names no folder.
+ pub fn folder_photo_order(&self, path: &str) -> Vec {
+ let Some(root) = crate::folders::record_key(path) else { return Vec::new() };
+ let mut out = self.folder_saved_order(&root);
+ let seen: std::collections::HashSet = out.iter().copied().collect();
+ let mut rest: Vec<&Photo> =
+ self.photos().map(|p| p.as_ref()).filter(|p| !p.local && photo_directly_in(p, &root) && !seen.contains(&p.id)).collect();
+ rest.sort_unstable_by(|a, b| Sort::default().order(a, b));
+ out.extend(rest.into_iter().map(|p| p.id));
+ out
+ }
+
+ /// Year → month → day counts for the "By Date" section (newest first).
+ pub fn date_groups(&self) -> Vec {
+ date_groups_from(self.photos().filter(|p| p.in_library()).map(|p| &**p))
+ }
+
/// All keywords with usage counts, sorted by name.
pub fn keywords(&self) -> Vec<(String, usize)> {
let mut m: std::collections::BTreeMap = Default::default();
@@ -1655,6 +1723,13 @@ pub fn folder_rest(path: &str, root: &str) -> Option> {
Some(split_path(path, false).parts.into_iter().skip(depth).collect())
}
+/// A plain POSIX path: absolute, no `\`, `//`, `.` or `..` component and no trailing separator, so
+/// it is its own [`folder_key`] as it stands (on a platform that doesn't fold case) and can be
+/// matched without building one.
+fn plain_posix(path: &str) -> bool {
+ path.starts_with('/') && !path.starts_with("//") && !path.ends_with('/') && !path.contains('\\') && !path.contains("//") && !path.contains("/.")
+}
+
/// Whether a library photo (not one only browsed in Local) lies in the folder whose
/// [`folder_key`] is `root`. A plain POSIX path (no `\`, `.`, `..`, repeated or trailing
/// separators) is its own identity, so it is read without building a key for it: the check runs
@@ -1664,13 +1739,7 @@ pub(crate) fn photo_in_root(p: &Photo, root: &str) -> bool {
return false;
}
let crate::Source::File { path } = &p.source else { return false };
- let plain = path.starts_with('/')
- && !path.starts_with("//")
- && !path.ends_with('/')
- && !path.contains(['\\'])
- && !path.contains("//")
- && !path.contains("/.");
- if !cfg!(windows) && plain && root.starts_with('/') && !root.starts_with("//") {
+ if !cfg!(windows) && plain_posix(path) && root.starts_with('/') && !root.starts_with("//") {
let r = root.trim_end_matches('/');
return path.strip_prefix(r).is_some_and(|rest| rest.starts_with('/'));
}
@@ -1678,7 +1747,19 @@ pub(crate) fn photo_in_root(p: &Photo, root: &str) -> bool {
}
/// Whether `p` lies in the folder `root` itself (a [`folder_key`]), not in a folder inside it.
+/// Read without building a key for a plain POSIX path in a POSIX folder, as [`photo_in_root`] is:
+/// a folder's Custom Order asks it of every photo.
pub(crate) fn photo_directly_in(p: &Photo, root: &str) -> bool {
+ if let crate::Source::File { path } = &p.source
+ && !cfg!(windows)
+ && plain_posix(path)
+ && root.starts_with('/')
+ && !root.starts_with("//")
+ {
+ // the folder, a separator, then the file's name alone (a disk's key ends in `/`: nothing before it)
+ let r = root.trim_end_matches('/');
+ return path.strip_prefix(r).is_some_and(|rest| rest.strip_prefix('/').is_some_and(|name| !name.contains('/')));
+ }
crate::local::folder_of(p).is_some_and(|f| f.trim_end_matches('/') == root.trim_end_matches('/'))
}
diff --git a/crates/catalog/src/tests_custom_order.rs b/crates/catalog/src/tests_custom_order.rs
index 3b5eddbb91..5c25f35b9f 100644
--- a/crates/catalog/src/tests_custom_order.rs
+++ b/crates/catalog/src/tests_custom_order.rs
@@ -1,5 +1,6 @@
//! Custom Order: a regular album's photos in an order set by hand (`Album.photo_order`,
-//! `Op::SetAlbumPhotoOrder`, `SortKey::Custom`).
+//! `Op::SetAlbumPhotoOrder`, `SortKey::Custom`), and the same for the photos of one folder of the
+//! library (`FolderRecord.photo_order`, issue #1583).
use crate::*;
@@ -77,3 +78,235 @@ fn custom_order_survives_a_snapshot_and_journal_round_trip() {
// an album without one doesn't write the field (older builds read it unchanged)
assert!(!Catalog::new().to_snapshot().contains("photo_order"));
}
+
+/// A photo of the library at `path`, captured at `captured`.
+fn photo_at(c: &mut Catalog, path: &str, captured: &str) -> PhotoId {
+ let id = c.alloc_photo_id();
+ let name = path.rsplit(['/', '\\']).next().unwrap_or("x.jpg");
+ let mut p = Photo::new(id, Source::File { path: path.into() }, name, "JPEG", 4, 3, "2026-01-01");
+ p.captured = Some(captured.into());
+ c.apply(Op::AddPhoto { photo: Box::new(p) }).unwrap();
+ id
+}
+
+/// `/p/a` holds four photos (one spelled with a doubled separator), `/p/b` one, a folder inside
+/// `/p/a` one, and one photo of `/p/a` is only browsed in Local: the first four, and `/p/b`'s.
+fn folder_setup() -> (Catalog, Vec, PhotoId) {
+ let mut c = Catalog::new();
+ let ids: Vec = ["/p/a/a.jpg", "/p/a//b.jpg", "/p/a/c.jpg", "/p/a/d.jpg"]
+ .iter()
+ .enumerate()
+ .map(|(i, path)| photo_at(&mut c, path, &format!("2026-01-0{}T10:00:00", i + 1)))
+ .collect();
+ let other = photo_at(&mut c, "/p/b/e.jpg", "2025-01-01T10:00:00");
+ photo_at(&mut c, "/p/a/sub/f.jpg", "2024-01-01T10:00:00");
+ let local = photo_at(&mut c, "/p/a/g.jpg", "2023-01-01T10:00:00");
+ c.apply(Op::SetLocal { id: local, local: true }).unwrap();
+ (c, ids, other)
+}
+
+/// The photos the library imported from `path`, on their own or with those of the folders inside.
+fn folder(path: &str, only: bool) -> Filter {
+ Filter { library_folder: Some(path.into()), library_folder_only: only, ..Default::default() }
+}
+
+fn relink(id: PhotoId, path: &str) -> Op {
+ Op::Relink { id, file_name: "x.jpg".into(), source: Source::File { path: path.into() }, format: None }
+}
+
+#[test]
+fn a_folder_in_custom_order_sorts_its_own_photos_and_undoes_as_one_step() {
+ let (mut c, ids, _) = folder_setup();
+ let f = folder("/p/a", true);
+ assert_eq!(c.query(&f, &custom()), ids, "no order yet: capture date, the folder's own photos only");
+ // the order is kept as given and read through folder_photo_order: a repeat and a stranger are left out
+ let inv = c.apply(c.folder_photo_order_op("/p/a", vec![ids[2], ids[0], PhotoId(999), ids[2]])).unwrap();
+ assert_eq!(c.folder_record("/p/a").unwrap().photo_order, vec![ids[2], ids[0], PhotoId(999), ids[2]]);
+ assert_eq!(c.folder_photo_order("/p/a"), vec![ids[2], ids[0], ids[1], ids[3]], "the photos it lists, then the rest");
+ assert_eq!(c.query(&f, &custom()), vec![ids[2], ids[0], ids[1], ids[3]]);
+ assert_eq!(c.query(&f, &Sort { ascending: false, ..custom() }), vec![ids[3], ids[1], ids[0], ids[2]]);
+ // a filter narrows the view; the order holds among the photos left
+ let two = Filter { only: vec![ids[3], ids[0]], ..f.clone() };
+ assert_eq!(c.query(&two, &custom()), vec![ids[0], ids[3]]);
+ // a small edit is followed by asking the view whole, as it is for an album
+ let was = c.query(&f, &custom());
+ assert_eq!(c.follow(&was, &[ids[0]], &f, &custom(), None), was);
+ c.apply(inv).unwrap();
+ assert!(c.folder_record("/p/a").is_none(), "one undo step, back to no record");
+ assert_eq!(c.query(&f, &custom()), ids);
+}
+
+#[test]
+fn a_folder_order_is_about_where_the_photos_are_now() {
+ let (mut c, ids, other) = folder_setup();
+ c.apply(c.folder_photo_order_op("/p/a", vec![ids[3], ids[2], ids[1], ids[0]])).unwrap();
+ let f = folder("/p/a", true);
+ // moved to another folder: out of the order here, a newcomer there (after that folder's own photo)
+ c.apply(relink(ids[1], "/p/b/b.jpg")).unwrap();
+ assert_eq!(c.query(&f, &custom()), vec![ids[3], ids[2], ids[0]]);
+ assert_eq!(c.folder_photo_order("/p/b"), vec![other, ids[1]]);
+ // back again: where it was
+ c.apply(relink(ids[1], "/p/a/b.jpg")).unwrap();
+ assert_eq!(c.query(&f, &custom()), vec![ids[3], ids[2], ids[1], ids[0]]);
+ // into a folder inside: not the folder's own photo any more
+ c.apply(relink(ids[0], "/p/a/sub/a.jpg")).unwrap();
+ assert_eq!(c.query(&f, &custom()), vec![ids[3], ids[2], ids[1]]);
+ // deleted: out of the view, its place kept for when it comes back
+ c.apply(Op::SetDeleted { id: ids[2], deleted: true }).unwrap();
+ assert_eq!(c.query(&f, &custom()), vec![ids[3], ids[1]]);
+ c.apply(Op::SetDeleted { id: ids[2], deleted: false }).unwrap();
+ assert_eq!(c.query(&f, &custom()), vec![ids[3], ids[2], ids[1]]);
+ // removed for good: gone
+ c.apply(Op::RemovePhoto { id: ids[3] }).unwrap();
+ assert_eq!(c.query(&f, &custom()), vec![ids[2], ids[1]]);
+ // photos imported later follow, by capture date among themselves
+ let newer = photo_at(&mut c, "/p/a/new1.jpg", "2027-01-01T10:00:00");
+ let middle = photo_at(&mut c, "/p/a/new2.jpg", "2026-06-01T10:00:00");
+ assert_eq!(c.query(&f, &custom()), vec![ids[2], ids[1], middle, newer]);
+}
+
+#[test]
+fn a_folder_shown_with_the_folders_inside_it_has_no_custom_order() {
+ let (mut c, ids, _) = folder_setup();
+ c.apply(c.folder_photo_order_op("/p/a", vec![ids[3], ids[2], ids[1], ids[0]])).unwrap();
+ let with_subfolders = folder("/p/a", false);
+ let by_date = c.query(&with_subfolders, &Sort::default());
+ assert_eq!(by_date.len(), 5, "the folder's four and the one in the folder inside it");
+ assert_eq!(c.query(&with_subfolders, &custom()), by_date, "no one order for photos of several folders: by capture date");
+ assert_eq!(c.query(&folder("/p/a", true), &custom()), vec![ids[3], ids[2], ids[1], ids[0]], "on its own, it has one");
+ // a path that names no folder shows nothing, in Custom Order as in any other
+ assert!(c.query(&folder(".", true), &custom()).is_empty());
+ assert!(c.query(&folder("relative", true), &custom()).is_empty());
+}
+
+#[test]
+fn a_folder_with_nothing_below_it_has_a_custom_order_however_it_is_shown() {
+ let (mut c, _, other) = folder_setup();
+ // `/p/a` holds a photo in the folder inside it, `/p/b` nothing below it
+ assert!(!c.folder_view_has_custom_order("/p/a", true), "shown with what is below it: two folders' photos");
+ assert!(c.folder_view_has_custom_order("/p/a", false), "on its own");
+ assert!(c.folder_view_has_custom_order("/p/b", true) && c.folder_view_has_custom_order("/p/b", false));
+ assert!(!c.folder_view_has_custom_order(".", true) && !c.folder_view_has_custom_order("", false), "not a folder");
+ let x = photo_at(&mut c, "/p/b/x.jpg", "2026-01-01T10:00:00");
+ let y = photo_at(&mut c, "/p/b/y.jpg", "2026-01-02T10:00:00");
+ c.apply(c.folder_photo_order_op("/p/b", vec![y, x])).unwrap();
+ // (`folder(path, false)` shows the photos of the folders inside it too, `folder(path, true)` the folder alone)
+ // shown with the folders inside it, there is nothing to take in: the folder's own order all the same
+ // (the photo the order doesn't list follows)
+ assert_eq!(c.query(&folder("/p/b", false), &custom()), vec![y, x, other]);
+ assert_eq!(c.query(&folder("/p/b", true), &custom()), vec![y, x, other]);
+ assert_eq!(c.query(&folder("/p/a", false), &custom()), c.query(&folder("/p/a", false), &Sort::default()), "/p/a takes in the photo below it");
+ // a photo below it that the view wouldn't show doesn't count: one in Recently Deleted, one only browsed
+ let below = photo_at(&mut c, "/p/b/sub/z.jpg", "2026-01-03T10:00:00");
+ assert!(!c.folder_view_has_custom_order("/p/b", true));
+ assert_eq!(c.query(&folder("/p/b", false), &custom()), c.query(&folder("/p/b", false), &Sort::default()), "taken in: no one order");
+ assert_eq!(c.query(&folder("/p/b", true), &custom()), vec![y, x, other], "the folder alone keeps its order");
+ c.apply(Op::SetDeleted { id: below, deleted: true }).unwrap();
+ assert!(c.folder_view_has_custom_order("/p/b", true), "in Recently Deleted: not shown with the folder");
+ c.apply(Op::SetDeleted { id: below, deleted: false }).unwrap();
+ assert!(!c.folder_view_has_custom_order("/p/b", true));
+ c.apply(Op::SetLocal { id: below, local: true }).unwrap();
+ assert!(c.folder_view_has_custom_order("/p/b", true), "only browsed in Local: not shown with the folder");
+ c.apply(Op::RemovePhoto { id: below }).unwrap();
+ assert!(c.folder_view_has_custom_order("/p/b", true), "gone for good");
+ assert_eq!(c.query(&folder("/p/b", false), &custom()), vec![y, x, other], "the order, then the photo it doesn't list");
+}
+
+#[test]
+fn a_folder_takes_its_order_along_when_it_is_moved() {
+ let (mut c, ids, _) = folder_setup();
+ c.apply(c.folder_photo_order_op("/p/a", vec![ids[3], ids[1], ids[0], ids[2]])).unwrap();
+ c.apply(c.folder_label_op("/p/a", Some(ColorLabel::Red))).unwrap();
+ // the folder moves to /p/moved: its photos relink, then its record follows them
+ for (i, id) in ids.iter().enumerate() {
+ c.apply(relink(*id, &format!("/p/moved/{i}.jpg"))).unwrap();
+ }
+ for op in c.folder_records_follow("/p/a", "/p/moved") {
+ c.apply(op).unwrap();
+ }
+ let want = vec![ids[3], ids[1], ids[0], ids[2]];
+ assert_eq!(c.query(&folder("/p/moved", true), &custom()), want);
+ assert_eq!((c.folder_color_label("/p/moved"), c.folder_record("/p/a")), (Some(ColorLabel::Red), None));
+ // however the new place is spelled, it is the same folder
+ assert_eq!(c.folder_photo_order("/p/./moved/"), want);
+}
+
+#[test]
+fn a_folder_keeps_its_label_and_its_order_in_one_record() {
+ let (mut c, ids, _) = folder_setup();
+ c.apply(c.folder_label_op("/p/a", Some(ColorLabel::Red))).unwrap();
+ let inv = c.apply(c.folder_photo_order_op("/p/a", vec![ids[1], ids[0]])).unwrap();
+ assert_eq!(c.folder_record("/p/a").unwrap().clone(), FolderRecord { label: Some(ColorLabel::Red), photo_order: vec![ids[1], ids[0]] });
+ // a label change leaves the order alone
+ c.apply(c.folder_label_op("/p/a", Some(ColorLabel::Blue))).unwrap();
+ assert_eq!(c.folder_record("/p/a").unwrap().photo_order, vec![ids[1], ids[0]]);
+ c.apply(c.folder_label_op("/p/a", None)).unwrap();
+ assert_eq!(c.folder_record("/p/a").unwrap().label, None, "the record stays for the order");
+ // no order and no label: no record
+ c.apply(c.folder_photo_order_op("/p/a", vec![])).unwrap();
+ assert!(c.folder_record("/p/a").is_none());
+ // undoing the order gives back the record there was before it
+ c.apply(inv).unwrap();
+ assert_eq!(c.folder_record("/p/a").unwrap().clone(), FolderRecord { label: Some(ColorLabel::Red), photo_order: vec![] });
+}
+
+#[test]
+fn a_folder_order_needs_a_folder_and_reads_past_strangers() {
+ let (mut c, ids, _) = folder_setup();
+ for not_a_folder in ["", ".", "relative/x", "a/..", " "] {
+ assert!(c.folder_photo_order(not_a_folder).is_empty(), "{not_a_folder:?}");
+ assert!(!folders::folder_has_custom_order(not_a_folder), "{not_a_folder:?}");
+ let before = c.to_snapshot();
+ assert!(c.apply(c.folder_photo_order_op(not_a_folder, vec![ids[0]])).is_err(), "{not_a_folder:?} names no folder");
+ assert_eq!(c.to_snapshot(), before, "nothing changed");
+ }
+ for a_folder in ["/pics", "C:\\pics", "//nas/share/pics", "/"] {
+ assert!(folders::folder_has_custom_order(a_folder), "{a_folder:?}");
+ }
+ // a record written by hand, with repeats and ids of photos the folder doesn't hold: read, only
+ // what is the folder's own counts, and nothing is repeated
+ let record = FolderRecord { label: None, photo_order: vec![ids[3], PhotoId(999_999), ids[0], ids[3]] };
+ c.apply(Op::SetFolderRecord { folder: "/p/a".into(), record: Some(record) }).unwrap();
+ assert_eq!(c.folder_photo_order("/p/a"), vec![ids[3], ids[0], ids[1], ids[2]]);
+ assert_eq!(c.query(&folder("/p/a", true), &custom()), vec![ids[3], ids[0], ids[1], ids[2]]);
+}
+
+#[test]
+fn a_folder_order_survives_a_snapshot_and_an_older_record_has_none() {
+ let (mut c, ids, _) = folder_setup();
+ c.apply(c.folder_photo_order_op("/p/a", vec![ids[1], ids[0]])).unwrap();
+ let back = Catalog::from_snapshot(&c.to_snapshot()).unwrap();
+ let want = vec![ids[1], ids[0], ids[2], ids[3]];
+ assert_eq!(back.folder_photo_order("/p/a"), want);
+ assert_eq!(back.query(&folder("/p/a", true), &custom()), want);
+ // a record from before format 23 (a label, no order) opens with no order
+ let older = serde_json::to_string(&FolderRecord { label: Some(ColorLabel::Red), ..Default::default() }).unwrap();
+ assert!(!older.contains("photo_order"), "{older}");
+ assert!(serde_json::from_str::(&older).unwrap().photo_order.is_empty());
+ // a folder without one doesn't write the field either
+ let mut c = Catalog::new();
+ c.apply(c.folder_label_op("/pics", Some(ColorLabel::Red))).unwrap();
+ assert!(!c.to_snapshot().contains("photo_order"));
+}
+
+#[test]
+fn a_folder_order_goes_across_catalogs_under_the_importing_librarys_ids() {
+ use crate::transfer::{self, ConflictRule, ExportOptions};
+ let (mut c, ids, _) = folder_setup();
+ c.apply(c.folder_photo_order_op("/p/a", vec![ids[2], ids[0], ids[1]])).unwrap();
+ // the exported catalog keeps the ids, with the order
+ let all: Vec = c.photos().map(|p| p.id).collect();
+ let sub = transfer::subset(&c, &ExportOptions { photos: all, ..Default::default() });
+ assert_eq!(sub.folder_photo_order("/p/a"), vec![ids[2], ids[0], ids[1], ids[3]]);
+ // a library that numbers its own photos differently imports it: the order names its ids for the photos
+ let mut here = Catalog::new();
+ for i in 0..10 {
+ photo_at(&mut here, &format!("/mine/{i}.jpg"), "2026-01-01T10:00:00");
+ }
+ let op = transfer::plan_import(&here, &sub).ops(&mut here, &sub, ConflictRule::Keep);
+ here.apply(op).unwrap();
+ let id_of = |name: &str| here.photos().find(|p| p.file_name == name).unwrap().id;
+ let (a, b, d) = (id_of("a.jpg"), id_of("b.jpg"), id_of("d.jpg"));
+ assert!(a.0 > 10 && b.0 > 10 && d.0 > 10, "the imported photos were given ids of their own");
+ assert_eq!(here.folder_photo_order("/p/a"), vec![id_of("c.jpg"), a, b, d], "the folder's order, under this library's ids");
+}
diff --git a/crates/catalog/src/tests_folder_records.rs b/crates/catalog/src/tests_folder_records.rs
index 3198438ceb..9d165350c5 100644
--- a/crates/catalog/src/tests_folder_records.rs
+++ b/crates/catalog/src/tests_folder_records.rs
@@ -91,7 +91,7 @@ fn a_path_that_names_no_folder_is_refused() {
let mut c = library();
let before = c.to_snapshot();
for bad in ["", "relative/trip", ".", "a/.."] {
- let op = Op::SetFolderRecord { folder: bad.into(), record: Some(FolderRecord { label: Some(ColorLabel::Red) }) };
+ let op = Op::SetFolderRecord { folder: bad.into(), record: Some(FolderRecord { label: Some(ColorLabel::Red), ..Default::default() }) };
assert!(c.apply(op).is_err(), "{bad:?} names no folder");
}
assert_eq!(c.to_snapshot(), before);
diff --git a/crates/catalog/src/tests_format_version.rs b/crates/catalog/src/tests_format_version.rs
index 263874c53f..f4b5b58ce8 100644
--- a/crates/catalog/src/tests_format_version.rs
+++ b/crates/catalog/src/tests_format_version.rs
@@ -238,18 +238,20 @@ fn op_variants_are_versioned() {
Op::SetExported { .. } => 17,
Op::AddVignettingMap { .. } | Op::SetVignettingMapState { .. } => 18,
Op::SetMergeSources { .. } => 19,
+ Op::SetCompanion { .. } => 24,
}
}
/// v20: `Analysis.quality` (the Image Quality Scanner's scores); v21: `QualityScan.rating_written`; v22:
- /// `MergeSources.registration`.
- const NEWEST_FIELDS: u32 = 22;
+ /// `MergeSources.registration`; v23: `FolderRecord.photo_order` (a folder's Custom Order); v24:
+ /// `Photo.companion_jpeg` (the raw's companion JPEG, issue #1692).
+ const NEWEST_FIELDS: u32 = 24;
let map = lcc_develop::EmbeddedVignettingMap::from_ev([4, 4], [2, 2], None, Default::default(), &[0.0; 4]).unwrap();
let id = lcc_develop::VignettingMapId::of(&map);
let _vignetting = since(&Op::AddVignettingMap {
id,
record: Box::new(crate::VignettingMapRecord { map, photo: None, added: String::new(), withdrawn: false }),
});
- let newest = since(&Op::SetMergeSources { id: crate::PhotoId(1), sources: None });
+ let newest = since(&Op::SetCompanion { id: crate::PhotoId(1), companion: None });
assert_eq!(newest.max(NEWEST_FIELDS), VERSION, "the newest op's or fields' version must be the current format version");
}
diff --git a/crates/catalog/src/transfer.rs b/crates/catalog/src/transfer.rs
index 3efdff98db..0c480a07df 100644
--- a/crates/catalog/src/transfer.rs
+++ b/crates/catalog/src/transfer.rs
@@ -458,7 +458,11 @@ impl ImportPlan {
}
for (folder, r) in &other.folder_records {
if cat.folder_record(folder).is_none() {
- ops.push(Op::SetFolderRecord { folder: folder.clone(), record: Some(r.clone()) });
+ let mut r = r.clone();
+ // the folder's Custom Order names the other catalog's photos: this library's ids for
+ // them (the photos it doesn't take are left out of the order)
+ r.photo_order = r.photo_order.iter().filter_map(|p| map.get(p).copied()).collect();
+ ops.push(Op::SetFolderRecord { folder: folder.clone(), record: Some(r) });
}
}
// stacks made only of new photos
diff --git a/crates/codecs/Cargo.toml b/crates/codecs/Cargo.toml
index 76b76c0092..46983098ef 100644
--- a/crates/codecs/Cargo.toml
+++ b/crates/codecs/Cargo.toml
@@ -35,7 +35,7 @@ lcc-meta = { workspace = true }
# AVIF decode: clean-room pure-Rust AV1 decoder (no unsafe), the same pin as lcc-video. Native
# only: it indexes its buffers directly, and on wasm32 (panic = abort) a malformed file could
# take the page down instead of becoming an error, so the web build refuses AVIF.
-filmcraft-av1 = { git = "https://github.com/emmertex/filmcraft", rev = "3f0cb5f2a906087e5fdc1cd0bb685527da717ba4" }
+filmcraft-av1 = { git = "https://github.com/emmertex/filmcraft", rev = "4b82c5a1337dfad846a4a50e868c57ae4502f06c" }
ravif = { workspace = true, optional = true }
rav1e = { workspace = true, optional = true }
avif-serialize = { workspace = true, optional = true }
diff --git a/crates/codecs/src/exr_decode.rs b/crates/codecs/src/exr_decode.rs
new file mode 100644
index 0000000000..a2132713ba
--- /dev/null
+++ b/crates/codecs/src/exr_decode.rs
@@ -0,0 +1,183 @@
+//! OpenEXR import: the files our export writes and other apps' flat RGB(A) EXRs — scene-linear
+//! half or float samples kept linear ([`crate::Decoded::image`] is linear light in the file's
+//! chromaticities, matched to a known space where it is one, the OpenEXR specification's default
+//! otherwise). Deep data is not used, and of a mipmap the largest level: the first valid layer's
+//! largest resolution level is all our export writes. Read with the pure-Rust `exr` crate
+//! (BSD-3-Clause, no unsafe code), as the encoder is.
+
+use std::io::Cursor;
+
+use exr::meta::MetaData;
+use exr::meta::attribute::{Chromaticities, SampleType};
+use exr::prelude::traits::*;
+use lcc_raster::{Plane, Rgb32f};
+
+use crate::convert::check_size;
+use crate::{DecodeOptions, Decoded, Error, Format, NamedSpace, Result, SourceSpace, SpaceOrigin, Trc};
+
+const F: Format = Format::Exr;
+
+/// The malformed-input error for this format.
+fn malformed(e: impl std::fmt::Display) -> Error {
+ Error::Malformed(F, e.to_string())
+}
+
+/// (width, height, sample bits) of the first layer, from the header alone.
+pub(crate) fn header(bytes: &[u8]) -> Result<(u32, u32, u16)> {
+ let meta = MetaData::read_from_buffered(&mut Cursor::new(bytes), true).map_err(malformed)?;
+ let h = meta.headers.first().ok_or_else(|| malformed("the file has no layer"))?;
+ let (w, h) = dims(h.layer_size.0, h.layer_size.1)?;
+ Ok((w, h, sample_bits(&meta)))
+}
+
+/// Decode a flat RGB(A) EXR: the first valid layer's largest resolution level, its samples
+/// linear. The `exr` crate reads the header again before the pixels, so a hostile size is
+/// refused before the storage is made.
+pub(crate) fn decode(bytes: &[u8], opts: &DecodeOptions) -> Result {
+ let meta = MetaData::read_from_buffered(&mut Cursor::new(bytes), true).map_err(malformed)?;
+ let hdr = meta.headers.first().ok_or_else(|| malformed("the file has no layer"))?;
+ let (w, h) = dims(hdr.layer_size.0, hdr.layer_size.1)?;
+ check_size(F, u64::from(w), u64::from(h), opts)?;
+ let bits = sample_bits(&meta);
+ let has_alpha = hdr.channels.list.iter().any(|c| c.name.to_string().eq_ignore_ascii_case("a"));
+ let space = space_of(hdr.shared_attributes.chromaticities);
+
+ let total = (w as usize).saturating_mul(h as usize);
+ let stride = w as usize;
+ let image = exr::prelude::read()
+ .no_deep_data()
+ .largest_resolution_level()
+ .rgba_channels(
+ move |_, _| vec![0.0f32; total.saturating_mul(4)],
+ move |px: &mut Vec, at: exr::math::Vec2, c: (f32, f32, f32, f32)| {
+ if let Some(slot) = px.get_mut((at.1 * stride + at.0) * 4..(at.1 * stride + at.0) * 4 + 4) {
+ slot.copy_from_slice(&[c.0, c.1, c.2, c.3]);
+ }
+ },
+ )
+ .first_valid_layer()
+ .all_attributes()
+ .from_buffered(Cursor::new(bytes))
+ .map_err(malformed)?;
+ let px = image.layer_data.channel_data.pixels;
+ if px.len() < total.saturating_mul(4) {
+ return Err(malformed("the image data is short"));
+ }
+
+ // the reader hands straight (unassociated) alpha in the fourth sample
+ let alpha = has_alpha.then(|| Plane { width: w as usize, height: h as usize, data: px.as_chunks::<4>().0.iter().map(|c| c[3]).collect() });
+ let rgb = px.as_chunks::<4>().0.iter().map(|c| [c[0], c[1], c[2]]).collect();
+ Ok(Decoded {
+ format: F,
+ image: Rgb32f { width: w as usize, height: h as usize, data: rgb },
+ alpha,
+ infrared: None,
+ space,
+ bit_depth: bits as u8,
+ float: true,
+ has_alpha,
+ grayscale: false,
+ cmyk: false,
+ orientation: 1,
+ exif: None,
+ xmp: None,
+ icc: None,
+ width: w,
+ height: h,
+ source_width: w,
+ source_height: h,
+ })
+}
+
+/// The data window's size, sane.
+fn dims(w: usize, h: usize) -> Result<(u32, u32)> {
+ u32::try_from(w).ok().zip(u32::try_from(h).ok()).ok_or_else(|| malformed("the image is too large"))
+}
+
+/// The file's sample format (half or float; a u32 channel is read as float either way).
+fn sample_bits(meta: &MetaData) -> u16 {
+ let half = meta.headers.iter().any(|h| h.channels.list.iter().any(|c| c.sample_type == SampleType::F16));
+ if half { 16 } else { 32 }
+}
+
+/// The space the file's chromaticities name: a known one where they match one, else the matrix
+/// they describe. Without the attribute, the specification's default (linear Rec. 709).
+fn space_of(ch: Option) -> SourceSpace {
+ let Some(ch) = ch else {
+ return linear(NamedSpace::Srgb, SpaceOrigin::Untagged);
+ };
+ let to_xy = |v: exr::math::Vec2| lcc_color::Xy::new(f64::from(v.0), f64::from(v.1));
+ let space = lcc_color::RgbSpace { name: "EXR", r: to_xy(ch.red), g: to_xy(ch.green), b: to_xy(ch.blue), white: to_xy(ch.white) };
+ let m50 = crate::space::rgb_to_xyz_d50(&space);
+ match NamedSpace::recognize(&m50) {
+ Some(n) => linear(n, SpaceOrigin::Container),
+ None => SourceSpace { named: None, to_xyz_d50: m50, trc: Some([Trc::Linear, Trc::Linear, Trc::Linear]), origin: SpaceOrigin::Container },
+ }
+}
+
+/// A space with no encoding curve (EXR samples are linear light).
+fn linear(n: NamedSpace, origin: SpaceOrigin) -> SourceSpace {
+ let mut s = SourceSpace::named(n, origin);
+ s.trc = Some([Trc::Linear, Trc::Linear, Trc::Linear]);
+ s
+}
+
+#[cfg(test)]
+mod tests {
+ use super::*;
+
+ /// Our own export reads back: the same pixels, linear, and the space is named again.
+ #[test]
+ fn our_export_round_trips() {
+ let mut px: Vec<[f32; 3]> = Vec::new();
+ for y in 0..3u32 {
+ for x in 0..4u32 {
+ px.push([x as f32 / 4.0, y as f32 / 3.0, 0.25]);
+ }
+ }
+ let options = crate::ExrOptions { half: false, primaries: lcc_color::REC2020 };
+ let bytes = crate::encode_exr(4, 3, 3, bytemuck::cast_slice(&px), &options).unwrap();
+ let d = decode(&bytes, &DecodeOptions::fit(64, 64)).unwrap();
+ assert_eq!((d.width, d.height, d.bit_depth, d.float), (4, 3, 32, true));
+ assert!(d.space.named.is_some_and(|n| n == NamedSpace::Rec2020), "{:?}", d.space.named);
+ let a = &d.image.data[4];
+ assert!((a[0] - 0.0).abs() < 1e-5 && (a[1] - 1.0 / 3.0).abs() < 1e-5 && (a[2] - 0.25).abs() < 1e-5, "{a:?}");
+ assert!(!d.has_alpha, "no A channel was written");
+ }
+
+ /// Half floats decode as 16 bits; an alpha channel comes back as a plane.
+ #[test]
+ fn half_and_alpha() {
+ let px: Vec<[f32; 4]> = (0..12).map(|i| [i as f32 / 12.0, 0.5, 0.5, 0.75]).collect();
+ let options = crate::ExrOptions { half: true, primaries: lcc_color::REC2020 };
+ let bytes = crate::encode_exr(4, 3, 4, bytemuck::cast_slice(&px), &options).unwrap();
+ let d = decode(&bytes, &DecodeOptions::fit(64, 64)).unwrap();
+ assert_eq!((d.bit_depth, d.has_alpha), (16, true));
+ let alpha = d.alpha.as_ref().unwrap();
+ assert!((alpha.data[5] - 0.75).abs() < 1e-3, "half precision");
+ }
+
+ /// Hostile input: truncated and garbage files are errors, never a panic.
+ #[test]
+ fn hostile_bytes_are_errors() {
+ let px: Vec<[f32; 3]> = vec![[0.1, 0.2, 0.3]; 9];
+ let options = crate::ExrOptions { half: false, primaries: lcc_color::REC2020 };
+ let good = crate::encode_exr(3, 3, 3, bytemuck::cast_slice(&px), &options).unwrap();
+ for cut in [0, 4, 40, good.len() / 2, good.len() - 1] {
+ assert!(decode(&good[..cut.min(good.len())], &DecodeOptions::fit(64, 64)).is_err(), "cut at {cut}");
+ let _ = header(&good[..cut.min(good.len())]);
+ }
+ for garbage in [vec![0u8; 64], vec![0x76, 0x2f, 0x31, 0x01], {
+ let mut v = vec![0x76, 0x2f, 0x31, 0x01, 2, 0, 0, 0];
+ v.extend(std::iter::repeat_n(0xffu8, 512));
+ v
+ }] {
+ let _ = decode(&garbage, &DecodeOptions::fit(64, 64));
+ let _ = header(&garbage);
+ }
+ // a file larger than the decode budget allows is refused before the storage is made
+ let over = DecodeOptions { max_pixels: 4, ..Default::default() };
+ assert!(decode(&good, &over).is_err(), "over budget");
+ let _ = header(&good);
+ }
+}
diff --git a/crates/codecs/src/lib.rs b/crates/codecs/src/lib.rs
index a212d4e26d..f40b8fe3e3 100644
--- a/crates/codecs/src/lib.rs
+++ b/crates/codecs/src/lib.rs
@@ -28,6 +28,7 @@ mod convert;
pub mod display;
pub mod encode;
pub mod exif;
+mod exr_decode;
mod exr_encode;
pub mod gainmap;
mod heif;
@@ -280,6 +281,7 @@ pub fn read_header_unguarded(bytes: &[u8], format: Format) -> Result {
Format::Tiff => tiff_codec::header(bytes)?,
Format::WebP => webp::header(bytes)?,
Format::Psd => psd::header(bytes)?,
+ Format::Exr => exr_decode::header(bytes)?,
Format::Heif => heif::header(bytes)?,
#[cfg(not(target_arch = "wasm32"))]
Format::Avif => avif::header(bytes)?,
@@ -320,6 +322,7 @@ pub fn decode_unguarded(bytes: &[u8], format: Format, opts: &DecodeOptions) -> R
Format::WebP => webp::decode(bytes, &opts),
Format::Gif | Format::Bmp => other::decode(bytes, format, &opts),
Format::Psd => psd::decode(bytes, &opts),
+ Format::Exr => exr_decode::decode(bytes, &opts),
#[cfg(feature = "jxl")]
Format::Jxl => jxl::decode(bytes, &opts),
#[cfg(not(feature = "jxl"))]
diff --git a/crates/codecs/src/sniff.rs b/crates/codecs/src/sniff.rs
index 7452728304..80cc0c8412 100644
--- a/crates/codecs/src/sniff.rs
+++ b/crates/codecs/src/sniff.rs
@@ -20,6 +20,8 @@ pub enum Format {
Bmp,
/// Photoshop PSD / PSB (merged composite).
Psd,
+ /// OpenEXR (scene-linear RGB(A), half or float).
+ Exr,
/// TIFF-structured camera raw (DNG, CR2, NEF, ARW, PEF, ORF, RW2, SRW, 3FR, IIQ, ERF, …):
/// route to `lcc-raw`.
RawTiffLike,
@@ -41,6 +43,7 @@ impl Format {
Format::Gif => "gif",
Format::Bmp => "bmp",
Format::Psd => "psd",
+ Format::Exr => "exr",
Format::RawTiffLike => "dng",
Format::RawOther => "raw",
}
@@ -58,6 +61,7 @@ impl Format {
Format::Gif => "image/gif",
Format::Bmp => "image/bmp",
Format::Psd => "image/vnd.adobe.photoshop",
+ Format::Exr => "image/x-exr",
Format::RawTiffLike | Format::RawOther => "image/x-raw",
}
}
@@ -100,6 +104,9 @@ pub fn sniff(b: &[u8]) -> Option {
if b.starts_with(b"\x89PNG\r\n\x1a\n") {
return Some(Format::Png);
}
+ if b.starts_with(&[0x76, 0x2f, 0x31, 0x01]) {
+ return Some(Format::Exr);
+ }
if b.starts_with(b"GIF87a") || b.starts_with(b"GIF89a") {
return Some(Format::Gif);
}
diff --git a/crates/engine/Cargo.toml b/crates/engine/Cargo.toml
index a5bf936542..acb61b253f 100644
--- a/crates/engine/Cargo.toml
+++ b/crates/engine/Cargo.toml
@@ -168,8 +168,8 @@ lcc-video = { workspace = true, features = ["test-util"] }
# M14.4: the GPU playback LUT benchmark (bench_playback)
wgpu = { workspace = true }
pollster = { workspace = true }
-filmcraft-h264enc = { git = "https://github.com/emmertex/filmcraft", rev = "3f0cb5f2a906087e5fdc1cd0bb685527da717ba4" }
-filmcraft-isobmff = { git = "https://github.com/emmertex/filmcraft", rev = "3f0cb5f2a906087e5fdc1cd0bb685527da717ba4" }
+filmcraft-h264enc = { git = "https://github.com/emmertex/filmcraft", rev = "4b82c5a1337dfad846a4a50e868c57ae4502f06c" }
+filmcraft-isobmff = { git = "https://github.com/emmertex/filmcraft", rev = "4b82c5a1337dfad846a4a50e868c57ae4502f06c" }
[target.'cfg(windows)'.dependencies]
# free space on Windows (the Folders panel); its own unsafe FFI stays inside the crate
diff --git a/crates/engine/src/base_curves.rs b/crates/engine/src/base_curves.rs
index c17b086a5e..1717d6c43e 100644
--- a/crates/engine/src/base_curves.rs
+++ b/crates/engine/src/base_curves.rs
@@ -175,6 +175,10 @@ pub fn list_for(camera: &str) -> Vec {
first
}
+/// Tests that install curves into the shared library take this, one at a time.
+#[cfg(test)]
+pub(crate) static LIBRARY_LOCK: Mutex<()> = Mutex::new(());
+
#[cfg(test)]
mod tests {
use super::*;
@@ -254,6 +258,7 @@ mod tests {
#[test]
fn a_curve_matches_the_camera_it_names_and_the_selector_lists_those_first() {
+ let _library = LIBRARY_LOCK.lock().unwrap_or_else(PoisonError::into_inner);
assert!(matches_camera("Nikon Z 8", "NIKON Z 8"));
assert!(matches_camera("NikonZ8", "Nikon Z 8"));
assert!(matches_camera("Nikon Z 8", "NIKON CORPORATION NIKON Z 8"));
diff --git a/crates/engine/src/camera_preview.rs b/crates/engine/src/camera_preview.rs
index e49122418e..fc1fabfc93 100644
--- a/crates/engine/src/camera_preview.rs
+++ b/crates/engine/src/camera_preview.rs
@@ -4020,6 +4020,8 @@ mod tests {
assert!(!file_local_look(RawFormat::Dng));
// Mamiya MEF has no camera JPEG to measure a look from (its previews are uncompressed RGB)
assert!(!file_local_look(RawFormat::Mef));
+ // FITS keeps no camera JPEG (no embedded preview at all) to measure a look from
+ assert!(!file_local_look(RawFormat::Fits));
}
#[test]
diff --git a/crates/engine/src/camera_profiles.rs b/crates/engine/src/camera_profiles.rs
index 6037b9e336..29a698e6fd 100644
--- a/crates/engine/src/camera_profiles.rs
+++ b/crates/engine/src/camera_profiles.rs
@@ -340,6 +340,46 @@ pub(crate) fn test_library_lock() -> std::sync::MutexGuard<'static, ()> {
LOCK.lock().unwrap_or_else(std::sync::PoisonError::into_inner)
}
+/// The decoder's profile registries emptied for a test: no active `.dcp`, imported or calibrated profiles (not even
+/// the bundled calibrations) until it drops, when what was installed comes back. A test whose camera must develop
+/// from its own matrices or its fitted look holds this; the registries are per process, so otherwise the answer
+/// would depend on whether some other test in the process had installed the bundled calibrations
+/// ([`install_dcps`]) or a profile of its own. Holds the [`test_library_lock`] for its life.
+#[cfg(test)]
+pub(crate) struct NoInstalledProfiles {
+ _lock: std::sync::MutexGuard<'static, ()>,
+ active: Vec,
+ library: Vec<(String, lcc_raw::dcp::Dcp)>,
+ calibrated: Vec,
+}
+
+#[cfg(test)]
+impl NoInstalledProfiles {
+ pub(crate) fn hold() -> NoInstalledProfiles {
+ // (the lock runs `install_dcps` first, so its one-time install never lands inside the empty window)
+ let lock = test_library_lock();
+ let saved = NoInstalledProfiles {
+ _lock: lock,
+ active: lcc_raw::dcp::installed().iter().map(|d| (**d).clone()).collect(),
+ library: lcc_raw::dcp::library().into_iter().map(|(id, d)| (id, (*d).clone())).collect(),
+ calibrated: lcc_raw::dcp::calibrated().iter().map(|c| (**c).clone()).collect(),
+ };
+ lcc_raw::dcp::install(Vec::new());
+ lcc_raw::dcp::install_library(Vec::new());
+ lcc_raw::dcp::install_calibrated(Vec::new());
+ saved
+ }
+}
+
+#[cfg(test)]
+impl Drop for NoInstalledProfiles {
+ fn drop(&mut self) {
+ lcc_raw::dcp::install(std::mem::take(&mut self.active));
+ lcc_raw::dcp::install_library(std::mem::take(&mut self.library));
+ lcc_raw::dcp::install_calibrated(std::mem::take(&mut self.calibrated));
+ }
+}
+
/// Folder of calibration files under development (debug and test builds only): `{ENV_PREFIX}_CAMERA_CALIBRATIONS`.
fn dev_calibrations_dir() -> Option {
if cfg!(debug_assertions) { lcc_brand::env_os("CAMERA_CALIBRATIONS").map(PathBuf::from) } else { None }
diff --git a/crates/engine/src/capture_one_catalog.rs b/crates/engine/src/capture_one_catalog.rs
index 1dd566e450..52362b2fac 100644
--- a/crates/engine/src/capture_one_catalog.rs
+++ b/crates/engine/src/capture_one_catalog.rs
@@ -310,6 +310,9 @@ pub fn read_with_progress(path: &Path, cancel: &AtomicBool, total: &AtomicUsize,
let layers = crate::capture_one_develop::read_layers(&reader, &entities, cancel).map_err(|e| e.replace("Lightroom", "Capture One"))?;
done.fetch_add(1, Ordering::Relaxed);
let mut not_imported: BTreeMap = BTreeMap::new();
+ let mut levels_too_close = 0usize;
+ let mut levels_unreadable = 0usize;
+ let mut film_curve_unreadable = 0usize;
let mut keyword_names: HashMap> = HashMap::new();
for (pk, k) in &keyword_tree {
keyword_names.entry(text(k, "ZNAME").trim().to_lowercase()).or_default().push(*pk);
@@ -421,11 +424,20 @@ pub fn read_with_progress(path: &Path, cancel: &AtomicBool, total: &AtomicUsize,
let develop = layers
.get(&variant_pk)
.map(|l| crate::capture_one_develop::develop_of(l, [width as f64, height as f64], (camera_make, camera_model)))
- .filter(|d| !d.is_empty() || !d.not_imported.is_empty());
+ .filter(|d| !d.is_empty() || !d.not_imported.is_empty() || d.levels_unreadable || d.film_curve_unreadable);
for tool in develop.iter().flat_map(|d| &d.not_imported) {
let count = not_imported.entry(tool.clone()).or_default();
*count = count.saturating_add(1);
}
+ if develop.as_ref().is_some_and(|d| d.levels_too_close) {
+ levels_too_close = levels_too_close.saturating_add(1);
+ }
+ if develop.as_ref().is_some_and(|d| d.film_curve_unreadable) {
+ film_curve_unreadable = film_curve_unreadable.saturating_add(1);
+ }
+ if develop.as_ref().is_some_and(|d| d.levels_unreadable) {
+ levels_unreadable = levels_unreadable.saturating_add(1);
+ }
photos.push(CatalogPhoto {
source_id: variant_pk,
uuid: if uuid.is_empty() { String::new() } else { format!("c1:{uuid}") },
@@ -464,6 +476,19 @@ pub fn read_with_progress(path: &Path, cancel: &AtomicBool, total: &AtomicUsize,
for (tool, count) in not_imported {
warnings.push(format!("Capture One {tool}: used on {count} photo(s), not imported yet (the photos keep the rest of their settings)"));
}
+ if film_curve_unreadable > 0 {
+ warnings
+ .push(format!("Capture One base curve: values could not be read on {film_curve_unreadable} photo(s); no curve was set for these photos"));
+ }
+ if levels_unreadable > 0 {
+ warnings.push(format!("Capture One Levels: values could not be read on {levels_unreadable} photo(s); Levels skipped for these photos"));
+ }
+ if levels_too_close > 0 {
+ warnings.push(format!(
+ "Capture One Levels: black and white points closer than {} levels on {levels_too_close} photo(s); they were moved apart",
+ lcc_develop::LEVELS_MIN_GAP
+ ));
+ }
// ---- albums, with the projects and groups that hold them
let kinds: HashMap = collections
@@ -597,6 +622,7 @@ pub fn read_with_progress(path: &Path, cancel: &AtomicBool, total: &AtomicUsize,
#[cfg(test)]
mod tests {
use super::*;
+ use lcc_develop::base_curve;
/// A SQLite file with these tables, one leaf page each; a table's columns are its rows' keys.
fn sqlite(tables: &[(&str, Vec)]) -> Vec {
@@ -813,15 +839,17 @@ mod tests {
let read = read_with_progress(&db, &cancel, &AtomicUsize::new(0), &AtomicUsize::new(0)).unwrap();
let c1 = read.photos[0].capture_one.as_deref().expect("variant 7 has settings");
assert_eq!(c1.not_imported, vec!["LCC", "Local adjustment layers"], "Brightness is imported");
+ assert_eq!(c1.sliders.get("light.brightness"), Some(&25.0), "Capture One's 12.5 doubled");
assert!(read.photos[1].capture_one.is_none(), "an untouched variant has nothing to import");
let warnings = read.warnings.join("\n");
assert!(warnings.contains("Capture One LCC: used on 1 photo(s), not imported yet"), "{warnings}");
+ assert!(!warnings.contains("Capture One Brightness"), "Brightness is imported now: {warnings}");
let mut s = crate::Session::new();
let report = crate::lightroom_catalog::import(&mut s, &db, false).unwrap();
let photo = |name: &str| s.catalog.photos().find(|p| p.file_name == name).unwrap().clone();
let a = photo("a.NEF");
assert_eq!(a.develop.light.exposure, 0.75);
- assert_eq!(a.develop.light.brightness, 25.0, "Capture One's Brightness doubled onto the app's scale");
+ assert_eq!(a.develop.light.brightness, 25.0, "Capture One's Brightness doubled onto the app's scale, unrounded");
assert_eq!(a.develop.orientation, lcc_geom::Orientation::from_parts(false, 1));
let g = a.develop.crop.geometry.rect;
// the centre (3000, 2000) of the 6000 × 4000 stored image is the centre shown; 2000 × 3000 of 4000 × 6000
@@ -842,6 +870,100 @@ mod tests {
let _ = std::fs::remove_dir_all(&dir);
}
+ /// Brightness and the global Levels land in the photo's settings; Levels on a local adjustment layer are named
+ /// next to the generic local-layers line, and points the Levels tool would have to move apart are said so.
+ #[test]
+ fn brightness_and_global_levels_import_and_local_levels_are_named() {
+ let dir = std::env::temp_dir().join(format!("c1-levels-{}", std::process::id()));
+ let _ = std::fs::remove_dir_all(&dir);
+ std::fs::create_dir_all(&dir).unwrap();
+ let db = dir.join("Test.cocatalogdb");
+ let defaults = json!({"ZBRIGHTNESS": 0, "ZLEVELSSHADOW": "0.000;0.000;0.000;0.000", "ZLEVELSHIGHLIGHT": "1.000;1.000;1.000;1.000",
+ "ZMIDTONE": "0.000;0.000;0.000;0.000", "ZLEVELSTARGETSHADOW": "0.000;0.000;0.000;0.000",
+ "ZLEVELSTARGETHIGHLIGHT": "1.000;1.000;1.000;1.000", "ZLEVELSTARGETENABLE": 1});
+ std::fs::write(
+ &db,
+ develop_catalog(vec![
+ layer(1, 18, 7, defaults.clone()),
+ layer(
+ 2,
+ 17,
+ 7,
+ json!({"ZBRIGHTNESS": 20.5, "ZLEVELSSHADOW": "0.000;0.000;0.000;0.750", "ZLEVELSHIGHLIGHT": "1.000;1.000;1.000;0.250",
+ "ZMIDTONE": "0.000;0.000;0.000;0.500", "ZLEVELSTARGETENABLE": 1}),
+ ),
+ // a local layer with Levels of its own, and one without
+ layer(3, 23, 7, json!({"ZLEVELSHIGHLIGHT": "1.000;1.000;1.000;0.600", "ZLEVELSTARGETENABLE": 1})),
+ layer(4, 23, 7, json!({"ZLEVELSHIGHLIGHT": "1.000;1.000;1.000;1.000", "ZLEVELSTARGETENABLE": 1})),
+ layer(5, 18, 8, defaults),
+ layer(6, 17, 8, json!({"ZLEVELSSHADOW": "0.000;0.000;0.000;0.500", "ZLEVELSHIGHLIGHT": "1.000;1.000;1.000;0.502"})),
+ ]),
+ )
+ .unwrap();
+ let mut s = crate::Session::new();
+ let report = crate::lightroom_catalog::import(&mut s, &db, false).unwrap();
+ let photo = |name: &str| s.catalog.photos().find(|p| p.file_name == name).unwrap().clone();
+ let a = photo("a.NEF");
+ assert_eq!(a.develop.light.brightness, 41.0);
+ let m = a.develop.levels.master;
+ assert_eq!((m.black, m.white, m.midtone), (191.25, 63.75, 0.5), "inverted, as stored");
+ assert!(a.develop.levels.red.is_default() && a.develop.levels.green.is_default() && a.develop.levels.blue.is_default());
+ // black 127.5 and white 128.01: the tool keeps them at least 2 levels apart
+ let b = photo("b.NEF").develop.levels.master;
+ assert!((b.white - b.black).abs() >= lcc_develop::LEVELS_MIN_GAP, "{b:?}");
+ let warnings: Vec<&str> = report["warnings"].as_array().unwrap().iter().filter_map(Value::as_str).collect();
+ for line in [
+ "Capture One Levels (local adjustments): used on 1 photo(s), not imported yet (the photos keep the rest of their settings)",
+ "Capture One Local adjustment layers: used on 1 photo(s), not imported yet (the photos keep the rest of their settings)",
+ "Capture One Levels: black and white points closer than 2 levels on 1 photo(s); they were moved apart",
+ ] {
+ assert!(warnings.contains(&line), "{line}: {warnings:?}");
+ }
+ assert!(!warnings.iter().any(|w| w.starts_with("Capture One Brightness")), "{warnings:?}");
+ let unmapped =
+ |id: &str| report["unmapped"].get(id).and_then(Value::as_array).map(|a| a.iter().filter_map(Value::as_str).collect::>());
+ assert_eq!(unmapped("7"), Some(vec!["Levels (local adjustments)", "Local adjustment layers"]));
+ assert_eq!(unmapped("8"), None, "the second variant's Levels are all imported");
+ let _ = std::fs::remove_dir_all(&dir);
+ }
+
+ /// Capture One can save Exposure, Brightness and Levels as the camera's defaults: a variant that keeps them has
+ /// them imported, even with no adjustment layer of its own; a neutral default alone imports nothing.
+ #[test]
+ fn a_default_layer_with_exposure_brightness_and_levels_is_imported_without_edits() {
+ let dir = std::env::temp_dir().join(format!("c1-defaults-{}", std::process::id()));
+ let _ = std::fs::remove_dir_all(&dir);
+ std::fs::create_dir_all(&dir).unwrap();
+ let db = dir.join("Test.cocatalogdb");
+ let neutral =
+ json!({"ZEXPOSURE": 0, "ZBRIGHTNESS": 0, "ZLEVELSSHADOW": "0.000;0.000;0.000;0.000", "ZLEVELSHIGHLIGHT": "1.000;1.000;1.000;1.000"});
+ let saved = json!({"ZEXPOSURE": 0.5, "ZBRIGHTNESS": 10, "ZLEVELSSHADOW": "0.000;0.000;0.000;0.100",
+ "ZLEVELSHIGHLIGHT": "1.000;1.000;1.000;0.800"});
+ std::fs::write(
+ &db,
+ develop_catalog(vec![
+ // variant 7: a saved default and no layer of the user's; variant 8: a neutral default, nothing else
+ layer(1, 18, 7, saved),
+ layer(2, 18, 8, neutral),
+ ]),
+ )
+ .unwrap();
+ let read = read_with_progress(&db, &AtomicBool::new(false), &AtomicUsize::new(0), &AtomicUsize::new(0)).unwrap();
+ assert!(read.photos[0].capture_one.is_some(), "the saved default is imported");
+ assert!(read.photos[1].capture_one.is_none(), "a neutral default has nothing to import");
+ let mut s = crate::Session::new();
+ let report = crate::lightroom_catalog::import(&mut s, &db, false).unwrap();
+ let photo = |name: &str| s.catalog.photos().find(|p| p.file_name == name).unwrap().clone();
+ let a = photo("a.NEF");
+ assert_eq!((a.develop.light.exposure, a.develop.light.brightness), (0.5, 20.0));
+ assert_eq!((a.develop.levels.master.black, a.develop.levels.master.white), (25.5, 204.0));
+ let b = photo("b.NEF");
+ assert_eq!((b.develop.light.exposure, b.develop.light.brightness), (0.0, 0.0));
+ assert!(b.develop.levels.master.is_default());
+ assert!(report["unmapped"].get("7").is_none() && report["unmapped"].get("8").is_none());
+ let _ = std::fs::remove_dir_all(&dir);
+ }
+
#[test]
fn a_format_named_in_place_of_a_camera_is_no_camera() {
let row = |make: &str, model: &str, format: &str| -> Row {
@@ -1186,8 +1308,15 @@ mod tests {
if v <= 5 {
own["ZBRIGHTNESS"] = json!(12);
}
- if v >= 6 {
- own["ZHIGHLIGHTRECOVERY"] = json!(40);
+ match v {
+ 4 => own["ZSATURATION"] = json!(30),
+ 5 => {
+ own["ZSHADOWRECOVERY"] = json!(20);
+ own["ZCONTRAST"] = json!(15);
+ }
+ 7 => own["ZHIGHLIGHTRECOVERY"] = json!(-50),
+ _ if v >= 6 => own["ZHIGHLIGHTRECOVERY"] = json!(40),
+ _ => {}
}
add(17, v, own);
}
@@ -1224,8 +1353,9 @@ mod tests {
}
/// The manual's screenshot fixture is what [`manual_shot_fixture`] makes, and its import shows what the shot is
- /// for: the settings not imported yet with their photo counts, and the white balance marked approximate. When the
- /// generator changes, the test writes the new files to the temp folder and says where, to copy over.
+ /// for: the settings not imported yet with their photo counts, and the lines for the approximate Highlight, Shadow,
+ /// Saturation and white balance. When the generator changes, the test writes the new files to the temp folder and
+ /// says where, to copy over.
#[test]
fn the_manual_shot_fixture_is_synthetic_and_current() {
let fixture = Path::new(env!("CARGO_MANIFEST_DIR")).join("../../docs/manual-site/scripts/fixtures/capture-one");
@@ -1252,11 +1382,684 @@ mod tests {
// all of them fit the result window's eight warnings
assert!(warnings.len() <= 8, "{warnings:?}");
for line in [
+ "Capture One Highlight (positive values): used on 2 photo(s)",
"Capture One LCC: used on 2 photo(s)",
+ "Capture One Contrast: used on 1 photo(s)",
"Capture One Local adjustment layers: used on 1 photo(s)",
+ "Capture One Highlight: approximate on 1 photo(s)",
+ "Capture One Shadow: approximate on 1 photo(s)",
+ "Capture One Saturation: positive values on 1 photo(s)",
"Capture One White Balance: approximate on 5 photo(s)",
] {
assert!(warnings.iter().any(|w| w.starts_with(line)), "{line}: {warnings:?}");
}
+ // Brightness and Levels are imported now: the shot's list of what is not imported lost two lines
+ assert!(!warnings.iter().any(|w| w.starts_with("Capture One Brightness") || w.starts_with("Capture One Levels")), "{warnings:?}");
+ }
+
+ /// A catalog of photos shot on one (synthetic) camera, in `location`, with the layers given. The photo at index `i`
+ /// (from 0) is image `i + 1`; its variant is `7 + i`.
+ fn curve_catalog(layers: Vec