Skip to content

Add gear library and film capture metadata export with scan rig preserved in XMP#409

Merged
marcinz606 merged 3 commits into
marcinz606:mainfrom
jboneng:feature/EXIF_XMP_Managment
Jul 6, 2026
Merged

Add gear library and film capture metadata export with scan rig preserved in XMP#409
marcinz606 merged 3 commits into
marcinz606:mainfrom
jboneng:feature/EXIF_XMP_Managment

Conversation

@jboneng

@jboneng jboneng commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

A while ago I made myself a tool to easily add metadata about the gear used to capture the original image, it have been an integrated part of my workflow, so I basically recreated it into the metadata tab in negpy to make my workflow smoother.
I am not sure this fits within your vision for NegPy, but anyways here it is.

Summary

Adds a gear library and redesigned Metadata tab so users can tag each frame with original film capture info (camera, lens, film stock, process) and embed that into exported JPEG/TIFF/PNG files.

Key behavior:

  • Standard EXIF — When capture gear is set in the Metadata tab, film camera/lens/ISO/exposure are written to standard EXIF tags so Lightroom and other DAMs display them correctly. Scan-only leftovers (FocalLengthIn35mmFormat, scan exposure/ISO, etc.) are stripped to avoid mixed or confusing composite fields.
  • XMP (negpy namespace) — Capture fields are mirrored as Capture* tags; the digitization rig (DSLR, film scanner, copy-stand) is snapshotted from source EXIF as Scan* tags before any overwrite.
  • When capture gear is not set — Source scan EXIF is left unchanged; scan data is still preserved in negpy:Scan* XMP.
  • Per-frame persistence — Metadata is stored per image in the edit DB (same as other edits). Optional “Sync custom metadata to all files in batch export” applies the current frame’s metadata to the whole batch.

Includes:

  • Gear library at ~/NegPy/gear/ (cameras, lenses, film stocks, presets) with bundled starter data
  • Manage… dialog for CRUD
  • Live grouped metadata preview (Original capture / Scan / Process / File)
  • EXIF + XMP embed on export via embed_metadata
  • Tests and USER_GUIDE §11 updates

Test plan

  • Open Metadata tab — pick preset/camera/lens/film; preview updates
  • Manage… — add/edit/delete gear entries; combos refresh
  • Switch frames — metadata restores per frame; set different gear on two frames and confirm each persists
  • Export with gear set — ExifTool/Lightroom shows film camera/lens in standard EXIF; negpy:Scan* holds scan rig
  • Export without gear set — standard EXIF still shows scan device (Plustek/DSLR); no fabricated capture data
  • Batch export with “Sync custom metadata…” on/off — verify per-file vs shared metadata
  • uv run pytest tests/metadata/ tests/test_metadata_writer.py

@marcinz606

Copy link
Copy Markdown
Owner

really nice feature!

@marcinz606 marcinz606 merged commit 0f08dc4 into marcinz606:main Jul 6, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants