feat(assets): half-frame mode — two frames per scan - #554
Merged
Conversation
Half-frame cameras put two photos on one scan. A global toggle (mirrors RGB-scan) expands each file at discovery into two assets with hash <base>#1/#2 — every hash-keyed store (edits, history, marks, thumbnails) becomes per-half automatically. The decoded buffer is sliced at the auto-detected gutter before the pipeline, so bounds metering is independent per half; decode caches key on the unsuffixed hash so halves share one decode. Per-half sidecars (name.N.negpy), export stems name_1/name_2, batch workers, session restore, tutorial step.
|
Can you extend this function to split film strip scan into multiple frames? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Half-frame cameras (Pentax 17, Olympus Pen…) expose two photos per 35mm frame; scans arrive as one file with two images separated by an unexposed gutter. This adds a Half Frame toggle (Files toolbar, mirrors RGB-scan end to end): each scan appears as two frames on the contact sheet, each with independent edits, bounds metering, thumbnails, sidecars, and exports.
How
<base>#1/#2(negpy/services/assets/half_frame.py). Every hash-keyed store —file_settings,edit_history,file_marks, disk thumbnails, EXIF, render memo — becomes per-half with no schema changes.source_hash.base_hash()), so both halves reuse one decode. Slices are copied — cached buffers stay read-only.name.N.negpy; export stemsname_1/name_2;add_filessame-path guard matches per half; EXIF path-fallback rehoming excludes#hashes so it can't steal a half's edit.Validation
tests/test_half_frame.py): detector polarities/fallbacks/rejections, slice partition, identities, sidecar/export suffixes, discovery expansion, dedup guard, per-half bounds independence.samples/half_framePentax 17 scans: 6 split dead-center in the gutter; IMG428 (invisible gutter, night frames) correctly falls back to center.make allgreen — 2022 passed.Out of scope (v1)
Divider-drag UI, per-file split (mode is global like RGB-scan), RGB-triplet + half-frame combination (triplets stay whole).
closes #553