Import and crop a sheet into Tiles #5

Closed
opened 2026-10-06 03:55:52 +00:00 by crowmaki · 1 comment
Owner

Part of #1

Question

How should importing a single generated turnaround sheet and cropping it into a Reference set's Tiles look and behave? Cover crop-box placement, snapping to the 4-tile template, re-cropping the same source into a new Reference version, and how the source sheet is kept as provenance.

Part of #1 ## Question How should importing a single generated turnaround sheet and cropping it into a Reference set's Tiles look and behave? Cover crop-box placement, snapping to the 4-tile template, re-cropping the same source into a new Reference version, and how the source sheet is kept as provenance.
Author
Owner

Resolution

Prototype: branch prototype/crop-sheet (route /prototype/crop-sheet?variant=A|B|C). There were three variants: A template rig, B tile-first steps, C cut lines.

UI. Combine A and B:

  • Importing opens A's single stage with all four crop boxes at once. They are auto-fitted to detected figures, with 1×4 / 2×2 template presets, "shrink to content", snapping to detected figure edges, and a padding control (default 24 px).
  • A side panel diffs each Tile's current version against the new crop, previewed in a 4:9 Atlas cell. Each Tile can be skipped.
  • Re-cropping and provenance live on the Reference set, as in B. Each Tile card has a version strip, a "Re-crop" action that reopens that version's sheet with its box loaded, and "Crop from sheet…" for any other Source sheet. Clicking a version shows its provenance: the Source sheet with the crop box highlighted.
  • C (cut lines) is dropped. It cannot handle 2×2 sheets and picks up captions.

Crop boxes are free-form. There is no aspect lock. The Atlas already scales each Tile to fit its cell and pads it on mid-grey ("Default atlas layout"), and the live 4:9 cell preview is enough to judge the result.

Storage and provenance.

  • A Source sheet is stored once as an immutable, content-hashed blob in the .studio file. It belongs to the Project, not to a Reference set.
  • Each imported Reference version stores its own cropped pixels, plus provenance (Source sheet id and crop box in sheet pixels). Imported and generated versions therefore stay the same kind of object, and Lock snapshots, Atlases and staleness never need the sheet.
  • A sheet is kept while any version points at it. Unreferenced sheets are cleaned up from a project-wide external-media view (new ticket).

One sheet, many sets. One crop session targets exactly one Reference set. The same sheet can be reopened from another set (e.g. a second Look on the same sheet).

  • Auto-fit maps the four largest detected figures in reading order to face → front → side → back.
  • Any other detected figures are shown as faint outlines and act as snap targets.
  • If fewer than four figures are found, the leftover Tiles get no box. You can add one by hand or leave the Tile empty, and an empty Tile changes Parity.

Commit rules.

  • A new version is created only for Tiles whose crop differs from the Tile's current version (a different sheet or a different box). Unchanged Tiles are skipped.
  • Re-cropping to match an older version still creates a new version number. Versions are append-only, and going back means picking the old version in a Lock snapshot.
  • Committing never locks.

Glossary: added Source sheet to CONTEXT.md and tightened Reference version.

## Resolution Prototype: branch `prototype/crop-sheet` (route `/prototype/crop-sheet?variant=A|B|C`). There were three variants: A template rig, B tile-first steps, C cut lines. **UI.** Combine A and B: - **Importing** opens A's single stage with all four crop boxes at once. They are auto-fitted to detected figures, with 1×4 / 2×2 template presets, "shrink to content", snapping to detected figure edges, and a padding control (default 24 px). - A side panel diffs each Tile's current version against the new crop, previewed in a 4:9 Atlas cell. Each Tile can be skipped. - **Re-cropping and provenance** live on the Reference set, as in B. Each Tile card has a version strip, a "Re-crop" action that reopens that version's sheet with its box loaded, and "Crop from sheet…" for any other Source sheet. Clicking a version shows its provenance: the Source sheet with the crop box highlighted. - C (cut lines) is dropped. It cannot handle 2×2 sheets and picks up captions. **Crop boxes are free-form.** There is no aspect lock. The Atlas already scales each Tile to fit its cell and pads it on mid-grey ("Default atlas layout"), and the live 4:9 cell preview is enough to judge the result. **Storage and provenance.** - A **Source sheet** is stored once as an immutable, content-hashed blob in the `.studio` file. It belongs to the Project, not to a Reference set. - Each imported Reference version stores **its own cropped pixels**, plus provenance (Source sheet id and crop box in sheet pixels). Imported and generated versions therefore stay the same kind of object, and Lock snapshots, Atlases and staleness never need the sheet. - A sheet is kept while any version points at it. Unreferenced sheets are cleaned up from a project-wide external-media view (new ticket). **One sheet, many sets.** One crop session targets exactly one Reference set. The same sheet can be reopened from another set (e.g. a second Look on the same sheet). - Auto-fit maps the four largest detected figures in reading order to face → front → side → back. - Any other detected figures are shown as faint outlines and act as snap targets. - If fewer than four figures are found, the leftover Tiles get no box. You can add one by hand or leave the Tile empty, and an empty Tile changes Parity. **Commit rules.** - A new version is created only for Tiles whose crop differs from the Tile's *current* version (a different sheet or a different box). Unchanged Tiles are skipped. - Re-cropping to match an older version still creates a new version number. Versions are append-only, and going back means picking the old version in a Lock snapshot. - Committing never locks. Glossary: added **Source sheet** to `CONTEXT.md` and tightened **Reference version**.
Sign in to join this conversation.
No description provided.