2196 Commits
Author SHA1 Message Date
Brandon ThomasandClaude Opus 5.5 759d3c7f8a M1.3: import (recursive folders, content-hash duplicates, add vs copy)
- engine::import: expand files/folders recursively (sorted; hidden entries
  and the library folder skipped), skip known paths, probe + hash in
  parallel (std::thread::scope), skip duplicates by content hash (against
  the library and within the batch), add in place or copy into
  <library>/Originals/YYYY/YYYY-MM-DD/ with unique names; one undoable op.
- library.import {paths, mode: add|copy, album?} returns
  {imported, duplicates[{path, existing, reason}], failed, scanned}.
- probe_bytes records the content hash (SipHash-1-3 128) on every photo.
- system clock for import/edit times on native (Session::with_system_clock).
- app: command-line folders are expanded by the engine (re-importing the
  same folder is a no-op); example gen_photos writes procedural test JPEGs
  (never committed).
- Measured (200 procedural 2000 px JPEGs, M-series): import 2.25 s; reopen:
  library load 1.7 ms, control ready 0.12 s, first thumbnail 0.17 s,
  visible grid drawn 0.48 s (thumbnails from the disk cache).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 00:04:07 -04:00
Brandon Thomas 77ff166841 Merge branch 'worktree-agent-ac4c81fc23fc995ec' 2026-10-01 00:03:41 -04:00
Brandon ThomasandClaude Opus 5.5 c6954d5bd9 M10.5: export metadata policy (all / all except camera / copyright / none, remove location) with EXIF + XMP embedding
New lightcraft_meta::write_exif (IFD0 + Exif + GPS IFDs; round-trip tested).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 00:03:38 -04:00
Brandon ThomasandClaude Opus 5.5 2d2bc2ad8f M0.11: web build (WASM)
apps/lightcraft-web runs the egui UI in the browser (eframe web, glow/WebGL2):
procedural demo library on load; in-memory imports via file picker
(Cmd+Shift+I) and drag-and-drop (MemStore + bytes-based engine hooks);
export goes through app.export and downloads in the browser; `?bench` logs
first-frame and slider latency. `cargo xtask web [--serve [port]] [--dev]`
builds with the matching wasm-bindgen CLI into <target>/web/; the web app is
part of the CI wasm check. Wasm fixes: lazy profiling Instant in pipeline,
web-time clocks in ui-egui (render timings were 0 on wasm). Docs: docs/web.md.
No persistence on web yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 00:01:18 -04:00
Brandon ThomasandClaude Opus 5.5 3cc97c58d1 M5.1: cache-friendly Gaussian blur (no transposes; in-row horizontal passes, banded running-sum vertical passes) + per-stage pipeline profiling
3–10x faster blurs on a 3000x2400 plane (min-of-9; machine under load, see blur_bench example).
LIGHTCRAFT_PROFILE=1 now also times log-lum, base, clarity, texture, dehaze, masks and NR.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 23:59:10 -04:00
Brandon ThomasandClaude Opus 5.5 17057f7bbc docs: README (MCP, CLI, export, status, contributing), AGENTS.md (asset enforcement, crash recovery, testing/perf), screenshots re-captured with Inter
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 23:52:34 -04:00
Brandon ThomasandClaude Opus 5.5 f0ffa11333 M0.1: enforce the asset rule in CI (cargo xtask assets); replace Adobe-published Source Sans 3 with Inter
Every image/icon/font/media/profile file must match an assets/ATTRIBUTION.md path pattern;
Adobe profile/template formats and Adobe-named assets are rejected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 23:52:33 -04:00
Brandon ThomasandClaude Opus 5.5 bcecab7d84 M1.5: thumbnail/preview cache (disk + memory LRU, prioritized job pool)
- new crate lightcraft-preview (L3): 128-bit content hashing (SipHash-1-3),
  cost-bounded Lru, DiskCache (JPEG q90 files keyed by content hash +
  settings hash + size + RENDER_CACHE_VERSION; temp+rename writes; LRU prune
  by mtime to 80% of budget; corrupt files dropped), PreviewCache (memory
  LRU over disk), JobPool (per-slot dedupe, priorities, reprioritize/drop,
  inline mode for wasm).
- engine: Session::thumb_job buckets thumbnails to 128/256/384/512 and serves
  them from the cache without decoding the source; decoded thumbnail
  sources now in a 384 MB LRU (was unbounded); library attaches
  <library>/thumbs; library.info cache stats; library.clearPreviews.
- ui-egui: Renderer runs on JobPool; thumbnails scrolled out of the
  prefetch area are dropped from the queue; on-screen thumbnails get
  re-prioritized; ui.inspect reports in-flight renders + thumb textures.
- Demo library (24 photos): grid fully drawn 4.4 s cold -> 0.21 s warm
  (24/24 disk hits, no source decoded).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 23:51:47 -04:00
Brandon ThomasandClaude Opus 5.5 c7be09429d M10.4: multithreaded AVIF encoding (ravif threading, speed 8): ~4x faster export
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 23:45:06 -04:00
Brandon ThomasandClaude Opus 5.5 f7b502309c M11.2: Fujifilm RAF decoding (uncompressed Bayer and X-Trans)
RAF header/record parsing, raw IFD (0xf000) with 16-bit, 12-bit LSB and
32-bit-word MSB packings found by black-box analysis of CC0 samples,
X-Trans layout (reversed record, anchored at 0,0), crop, black levels,
WB_GRB levels, metadata and preview from the embedded JPEG. Compressed
RAF reports Unsupported. Colour uses the documented neutral fallback.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 23:44:09 -04:00
Brandon ThomasandClaude Opus 5.5 e7b3724b5f M1.4: crash-safe catalog persistence (op log + snapshot)
- catalog: Store trait (FsStore: temp+fsync+rename+dir fsync; MemStore),
  Journal: CRC-checked JSON-lines op log with sequence numbers + atomic
  snapshots; torn final record dropped and truncated, stale records after a
  snapshot skipped, mid-log damage preserved as catalog.log.damaged-N.
- PushHistory op so each edit logs one history step (not the full history).
- engine: Session::open_library/persist/close_library; every top-level
  command is fsynced before returning; presets.json + view.json;
  library.info / library.compact commands.
- app: default library ~/Pictures/LightCraft Library (LIGHTCRAFT_LIBRARY or
  --library DIR override), --memory for throwaway sessions, snapshot on quit.
- tests: proptest replay(log)==state with random snapshots/reopens, every
  truncation of the last record, stale log, mid-log damage, FsStore, engine
  restart without close.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 23:40:40 -04:00
Brandon ThomasandClaude Opus 5.5 08617b02d9 fmt: rustfmt crates/pipeline/src/finish.rs (main was not fmt-clean; needed for cargo xtask ci)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 23:40:40 -04:00
Brandon ThomasandClaude Opus 5.5 908713c39b M10.2: MCP/CLI export shares the engine encoder (all formats, batch, size limit, sharpening)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 23:39:08 -04:00
Brandon Thomas 75dacbb49a Merge branch 'worktree-agent-a4280cb55a450d08a' 2026-09-30 23:37:39 -04:00
Brandon ThomasandClaude Opus 5.5 72ba795439 M10.2: export dialog + batch export (JPEG/PNG/TIFF/WebP/AVIF, size, file-size limit, output sharpening, naming, folder)
Export encoding lives in lightcraft-engine::export (pure bytes, shared by app/CLI/MCP/web).
Embeds our own sRGB ICC; writer creates the output folder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 23:37:24 -04:00
Brandon ThomasandClaude Opus 5.5 50307e59db M0.9: MCP server + lightcraft-cli
crates/mcp (lightcraft-mcp, L5): hand-written MCP over stdio (JSON-RPC 2.0,
protocol 2025-06-18 with 2025-03-26/2024-11-05 negotiation): initialize,
ping, tools/list, tools/call, resources/list/read. Two backends behind one
trait: Headless (in-process engine Session; answers engine.execute,
engine.commands, ui.render, app.export) and Remote (the desktop app's
loopback JSON-lines control channel; lazy connect + reconnect).

Tools: helpers (list_commands, run_command, import, query_photos,
select_photos, list_controls, get/set_develop, apply_preset, crop,
render_photo -> image content, export), UI tools when connected
(screenshot -> image content, inspect_ui, set_ui, list_widgets, click,
press_key, type_text, pointer_gesture), plus one cmd_<id> tool generated
per command in the registry (--compact omits them).

apps/lightcraft-cli: `mcp [--connect [ADDR]] [--demo] [--compact] [FILES]`,
`render <in> -o <out> [--set control=value]... [--settings] [--preset]
[--size] [--quality]`, `commands`, `controls`.

Acceptance e2e: crates/mcp/tests/e2e.rs sets exposure over MCP and renders
(headless and through the TCP transport); apps/lightcraft-cli/tests/cli.rs
does the same through the real binary's stdio. Docs: docs/mcp.md,
docs/control-protocol.md. Also rustfmt of one line in pipeline/finish.rs
(main was not fmt-clean).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 23:37:08 -04:00
Brandon ThomasandClaude Opus 5.5 59585102b1 M7.2: luminance + colour noise reduction (guided filter on log-luminance, chroma blur)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 23:29:07 -04:00
Brandon ThomasandClaude Opus 5.5 c0655d6fe6 M8.3: render heal/clone/remove spots (frequency-separation heal, auto source search)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 23:28:58 -04:00
Brandon ThomasandClaude Opus 5.5 ca35e7f888 M2.2: base profiles (Color/Neutral/Vivid/Landscape/Portrait/Monochrome) with amount
Profiles are our own looks applied underneath the user's sliders.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 23:28:51 -04:00
Brandon ThomasandClaude Opus 5.5 41c80a027d fmt: rustfmt crates/pipeline/src/finish.rs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 23:26:44 -04:00
Brandon ThomasandClaude Opus 5.5 5560415d56 M3.7: Nikon NEF uncompressed decoding
16-bit word and 12-bit MSB-packed uncompressed NEF, maker-note black
levels and WB_RBLevels, masked trailing column trim, robust white
estimate ignoring 0xFFFF padding. Huffman-compressed NEF is reported as
unsupported (no clean-room description available).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 22:58:34 -04:00
Brandon ThomasandClaude Opus 5.5 ac14995c75 ROADMAP: status update
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 22:58:07 -04:00
Brandon Thomas 7029602b1e Merge branch 'worktree-agent-af7fd3f101800f8dc' 2026-09-30 22:56:47 -04:00
Brandon ThomasandClaude Opus 5.5 440cedfa9c README: product-style showcase with screenshots of public-domain photos developed in LightCraft; reproducible showcase scripts; display-referred tone map for JPEGs (exact pass-through); fixes (crop panel wrap, overlay clipping, greyscale histogram, painted chevrons)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 22:56:38 -04:00
Brandon ThomasandClaude Opus 5.5 a7ea39573b M0.7/M0.8: Lightroom-style egui UI (top bar, My Photos, photo/square grid, loupe + filmstrip, Edit panel with histogram/curves/mixer/grading, crop/masking/remove/presets/info/keywords/versions/history, dialogs, shortcuts) + control channel + desktop app; engine file loading via codecs/raw
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 22:34:03 -04:00
Brandon Thomas b0d435f223 continued work 2026-09-30 22:21:57 -04:00
Brandon Thomas 955ae1f976 Merge branch 'agent-codecs' 2026-09-30 12:28:19 -04:00
Brandon ThomasandClaude Opus 5.5 52e4809995 M1.1: codecs MPF preview thumbnail test
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 12:27:09 -04:00
Brandon ThomasandClaude Opus 5.5 fa59a060dc M1.1: codecs fuzz/corpus/bench tests, thumbnail options, README
Property tests (random bytes behind every magic, mutated/truncated files),
corpus tests (corpus/images, pngsuite, raw routing, system ICC profiles),
ignored 24 MP JPEG benchmark, decode_thumbnail_with(min_embedded_edge),
fast deflate levels for PNG/TIFF, README with formats, licences, gaps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 12:26:05 -04:00
Brandon ThomasandClaude Opus 5.5 345f0454f2 M3.7: Sony ARW decoding (ARW2 cRAW, uncompressed, LJ92 tiles)
ARW2 implemented from Dietz, EI 2016 (128-bit blocks, interleaved 16-pixel
sets, 7-bit scaled deltas, 5-segment tone curve from 0x7010); black/white/
WB/CFA/crop from the raw IFD's documented Sony tags. Verified visually on
A7 III / A7 IV samples; ~500-850 MP/s row-parallel decode.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 11:59:49 -04:00
Brandon ThomasandClaude Opus 5.5 7cb30e5edd Untrack agent worktrees; ignore .claude/
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 11:46:03 -04:00
Brandon ThomasandClaude Opus 5.5 1c073db30f Merge agent-codecs: lightcraft-codecs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 11:46:03 -04:00
Brandon Thomas 07b94cac9a Merge branch 'worktree-agent-af7fd3f101800f8dc' 2026-09-30 11:45:45 -04:00
Brandon ThomasandClaude Opus 5.5 741e93e632 M3.7: Canon CR2 decoding + rawinfo/rawrender examples
IFD#3 lossless JPEG with 0xc640 slice reassembly, SensorInfo borders,
masked-column black levels per CFA position, saturation-plateau white,
as-shot WB from ColorBalance. Verified bit-identical to Adobe's DNG of
the same 5D Mark III frame. sRAW/mRAW reported as unsupported.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 11:43:46 -04:00
Brandon ThomasandClaude Opus 5.5 69e8aa6e18 M0.6: engine (Session, ~75 commands: library/photo/album/develop/crop/masks/spots/presets/versions/history/queries; undo via inverse ops; interactions; render jobs; demo library)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 11:33:29 -04:00
Brandon ThomasandClaude Opus 5.5 05450c791c M3.2-M3.6: lightcraft-raw DNG, LJ92, demosaic, highlights, DNG colour
- LJ92 (T.81 process 14) decoder + Annex K encoder: predictors 1-7,
  1-4 components, 2-16 bit, point transform, restart intervals
- DNG: uncompressed (packed 1-16 bit, 16/24/32-bit float), LJ92 tiles/
  strips, Deflate with predictors 2/3/34892-34895; CFA + LinearRaw;
  linearization, BlackLevelRepeatDim/Delta, WhiteLevel, ActiveArea,
  DefaultCrop; colour tags; OpcodeList1-3 parse/write/apply
- DNG writer (uncompressed / LJ92 tiles) for export and round trips
- demosaic: bilinear, PPG, AHD (Hirakawa-Parks), X-Trans directional
- highlight clip/reconstruct; DNG colour model with dual illuminant,
  forward matrices, as-shot neutral -> xy, Rec.2020 transform
- embedded preview extraction; malformed-input proptests

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 11:33:19 -04:00
Brandon ThomasandClaude Opus 5.5 304180a500 M1.1: lightcraft-codecs decode/encode, ICC, sniffing
Decoders (JPEG via zune-jpeg + jpeg-decoder for DCT scaling/CMYK, PNG,
TIFF, WebP, GIF, BMP, PSD composite, JPEG XL via jxl-oxide) produce linear
Rgb32f in source primaries with SourceSpace; ICC matrix/TRC applied exactly,
LUT/CMYK profiles through moxcms; to_working() to linear Rec.2020 D65.
Encoders: JPEG, PNG 8/16, TIFF 8/16/32f, lossless WebP, AVIF (native).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 11:30:26 -04:00
Brandon ThomasandClaude Opus 5.5 fe0ca43eed catalog: clippy
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 11:23:57 -04:00
Brandon ThomasandClaude Opus 5.5 76b2f82b7a M0.6: catalog v0 (ops with inverses, albums/folders, ratings/flags/labels, search tokens, filter/sort, snapshot + op-log replay)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 11:23:43 -04:00
Brandon ThomasandClaude Opus 5.5 90c910a5f6 M0.4: develop pipeline v0 (framing, WB, exposure, guided-filter local tone, clarity/texture, dehaze, masks, filmic tone map, OkLCh colour tools, gamut map, curves, vignette, grain, auto tone/WB)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 11:17:38 -04:00
Brandon ThomasandClaude Opus 5.5 728a272681 Asset rules: no Adobe assets ever; every asset open-licensed with an entry in assets/ATTRIBUTION.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 11:14:32 -04:00
Brandon ThomasandClaude Opus 5.5 cbe9d8989a M3.1: lightcraft-meta EXIF/XMP/IPTC
Metadata model; EXIF from TIFF/raw, JPEG APP1, PNG eXIf, WebP EXIF; XMP
read (namespace-canonicalised, arrays, structs) and write (dc/xmp/
photoshop/exif/exifEX/tiff/lr + lc:settings JSON); IPTC-IIM record 2;
container walkers for JPEG (incl. ICC and extended XMP), PNG, WebP.
Adds quick-xml and miniz_oxide to workspace deps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 11:08:42 -04:00
Brandon ThomasandClaude Opus 5.5 3f54765bd0 M0.3/M0.5: develop settings model + control specs + presets; procedural demo scenes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 11:06:57 -04:00
Brandon ThomasandClaude Opus 5.5 44d97a4104 M3.1: lightcraft-tiff reader/writer
Classic + BigTIFF, both byte orders, all field types, SubIFDs and Exif/GPS/
Interop pointer IFDs, strips/tiles layout, maker-note offset-base helpers,
IFD writer; hardened against malformed input (proptests). Placeholder
manifests for lightcraft-meta and lightcraft-raw.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 11:00:48 -04:00
Brandon ThomasandClaude Opus 5.5 474e44c29e Docs: ROADMAP.md with milestones and estimates; README Craft family table
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 10:57:30 -04:00
Brandon ThomasandClaude Opus 5.5 3f1ffeb690 M0.1/M0.2: workspace, xtask (layers/wasm/ci/stats), geom, color, raster
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 10:04:12 -04:00