Files
klarbild/CHANGELOG.md
till 4fb34cdab8 feat: sheet templates, margin profiles and delivering the sheet
Seeds the four sheet setups Till actually prints (Kita set, small school set,
full passport sheet, two 10x7,5 on 10x15 paper). A multi-format template
applied to a single image clones it into every format, so one click yields the
whole set. Margin gets one-click borderless / 5 mm / 10 mm profiles, and the
finished PDF can be pushed to Picdrop, the NAS or any extra target.
2026-08-18 06:40:31 +00:00

7.1 KiB
Raw Permalink Blame History

Changelog

All notable changes to Klarbild are documented here. Newest first.

2026-08-18 — Print module: exact sizes, sheets & crop marks (no AI)

Added

  • Print module (/druck) — a lab-style, completely AI-free path: crop, scale and place images at exact physical sizes. No model call, no cost, no queue.
  • Interactive crop editor — pan and zoom on a fixed target aspect ratio (rule-of-thirds overlay); the crop is stored relative (0..1) so it survives any source resolution.
  • Size presets & free input — biometric passport 35 × 45 mm, 2 × 3 / 3 × 4 / 4 × 5 / 4,5 × 6 cm, 9 × 13 … 50 × 70 cm, squares, DIN. Free input understands 12x15 (cm), 35x45mm, 5 (= 5 × 5 cm) and 4:3/15 (ratio + long edge).
  • Sheet layout — paper presets DIN A6A2 incl. A3+ (329 × 483 mm), photo-paper cuts (9 × 13 … 20 × 30), US Letter/Legal, plus any custom paper size. Portrait/landscape, printer margin, centering, per-image copy count.
  • Automatic nesting — identical sizes produce an exact grid; mixed sizes go through a MaxRects packer that fixes one orientation per format and tries every combination, so eight passport photos land in the free space next to the 13 × 18.
  • Crop markscorner (fine 0.25 pt marks outside the trim box, Photoshop/InDesign convention, 4 mm long / 3 mm offset by default) or grid (continuous guides across the sheet that never cross another image). Gap between images adapts to the chosen marks.
  • Bleed (010 mm) — the image extends past the trim box, edge pixels are copied rather than stretched; the gap is always ≥ 2 × bleed so neighbouring bleeds cannot overlap.
  • PDF output at 1:1 — the PDF page is exactly the sheet size (pdf-lib), with a footer stating the sizes, dpi and the "print at 100 %, not fit-to-page" reminder.
  • Single export — one image at an exact size as PNG/JPG with dpi metadata, plus a resolution warning when the source cannot hold the requested dpi.
  • Sheet templates — save the whole sheet setup (paper, marks, formats, counts) as a reusable preset (print_presets, migration 013).
  • All three entrances/druck in the web app, 📐 Druckbogen in Telegram (fully button-driven, returns an A4 PDF), and the MCP tools exact_size / print_sheet.
  • APIPOST /api/print/single, GET /api/print/single?size=… (mm → px calculator), POST /api/print/sheet, GET|POST|DELETE /api/print/presets. Documented in /llms.txt.
  • Seeded sheet templates — "Kita-Satz (A4)", "Schulsatz klein (A4)", "Passbildbogen 35×45 (A4)" and "2 × 10×7,5 auf Fotopapier 10×15". Loading a multi-format template with a single image clones that image into every format, so one click produces the whole set.
  • Margin profiles — borderless (0 mm), standard (5 mm) and safe (10 mm) as one-click buttons.
  • Deliver the sheet — the finished PDF can additionally be pushed to Picdrop, the NAS or any extra delivery target (deliver in the sheet request).
  • Teststests/printlayout.test.ts (npm test) covers size parsing, exact mm → px, non-overlap, margins, bleed spacing, mark geometry and multi-sheet paging.

2026-07-23 — Compose, generate & second backup

Added

  • Compose mode — combine multiple images + a text description into one new image.
  • Generate mode — create images from text only, no source needed.
  • The Frame "extend" — outpaint more scene around the motif instead of only cropping.
  • Reuse — take a finished result back into the studio as a new source to edit further.
  • Alternatives — generate additional versions of the same image, grouped with a switcher.
  • Folders — filter, rename and delete in the library; per-folder delivery gallery mapping.
  • Bulk actions — download selected results as a ZIP, move several into a folder at once.
  • Thumbnails — low-res previews for the library grid.
  • Models — quality tiers incl. open-source (FLUX.2); the used model is shown per image.
  • Color tags — Picdrop-style flags (red / orange / green / final) per image, filterable, and written into the companion .md metadata.
  • Tap-to-save — "Laden" opens the image full-bleed so on iPhone/iPad a long-press offers "Save to Photos" (plus a classic file download).
  • Access control & privacy — library visibility (own-only vs shared), optional anonymous generations (creator hidden from non-admins), admins always see all.
  • Private sessions — generate-and-forget: no library entry, no delivery/backup, no stored prompt, sources purged, result auto-deleted shortly after. Enabled globally by admin or forced per user.
  • NSFW gate — models flagged NSFW are only selectable/visible when the admin enables it. Operator responsibility; content involving minors is never permitted.
  • Single-image transform — compose now accepts one image, so a single photo can be transformed by prompt (e.g. "make it an oil painting") and put onto a format.
  • Multiple delivery targets — besides the default Picdrop, add any number of FTP/SFTP destinations; selectable in the studio ("Wohin?", incl. NAS); a preset or folder can be hard-wired to a specific target + gallery.
  • Backup to any target — mark any target as a backup destination (like the NAS); one-click "back up all images" mirrors to all backup destinations.
  • Metadata sidecar — optionally ship a companion .md (prompt, model, format …) next to each image on Picdrop/NAS/FTP.
  • Prompt view — every generated image shows its prompt in the library (with copy).
  • Preset manager — save current settings as a preset, load and delete presets.
  • API token + MCP server — programmatic access so an assistant can push images from a local folder or iMessage into Klarbild (mcp/klarbild-mcp.mjs).
  • The Frame preset now delivers to its own gallery ("TheFrame-Backgrounds").
  • Second backup — mirror every result over SFTP/FTPS to a NAS (works over Tailscale too), with a "NAS ✓" badge and a "mirror all existing images" action.
  • Storage management — thumbnails, delete sources after processing, auto-retention.
  • Telegram — fully button-driven (persistent keyboard + command menu): edit, compose, "new image", reuse — no slash commands required.
  • Reset — wipe library, jobs and folders cleanly (keeps users, settings, models, recipes), guarded by a typed confirmation.
  • Help page, in-app changelog, and a NAS reachability diagnostic.

Fixed / hardened

  • Real per-image cost cap (monthly budget) enforced by the worker.
  • Idempotent job completion (no duplicate delivery/notification).
  • Before/after comparison works for composed images; hidden for text-only results.

2026-07-22 — Foundation

Added

  • Astro 5 + React islands UI (mobile-first), PostgreSQL, fs/S3 storage abstraction.
  • pg-boss job queue with in-process worker; sharp pipeline (exact cm/dpi print sizes, sticker contour).
  • OpenRouter image gateway; admin-managed models.
  • Picdrop delivery over SFTP/FTPS; recipes; library with before/after.
  • Telegram bot (grammY webhook); argon2 auth; AES-256-GCM secret encryption.