bug(presets): applyPreset never applies TIFF DPI #113

Closed
opened 2026-08-26 15:10:30 +01:00 by gronod · 1 comment
Owner
Field Value
Labels Kind/Bug, Priority/Medium
Priority Medium
Milestone v0.3.3 hotfix
Related #88
Branch fix/presets-dpi-xss (from development)
Pair with 06-preset-xss.md — same PR

Description

ProfilingPreset includes dpi. The built-in Fast RGB Draft preset is dpi: 150. collectCurrentSettingsAsPreset hardcodes dpi: 300 and applyPreset never touches #tiffDpi. Loading or saving a preset cannot round-trip Stage 2 resolution.

Current behaviour

  • applyPreset writes colour space, patch count, white/black patches, instrument, page size, bit depth, colprof quality, and colprof algorithm.
  • applyPreset does not write #tiffDpi.
  • collectCurrentSettingsAsPreset sets dpi: 300 regardless of the form.
  • Selecting Fast RGB Draft (400 patches) therefore still prints at whatever DPI the form last had (default 300).

Proposed solution

  • In applyPreset, set document.getElementById("tiffDpi").value = preset.dpi.
  • In collectCurrentSettingsAsPreset, read #tiffDpi (fallback 300).
  • Validate the value is in the range already allowed by printtarg (72–600, or the existing control min/max).
  • Show DPI in the manage-presets subtitle next to patch count and page size.

Files

  • src/js/presets.js
  • src/index.html — optional subtitle text

Acceptance criteria

  • Selecting Fast RGB Draft (400 patches) sets the Stage 2 DPI control to 150.
  • Saving a custom preset at 200 DPI, reloading the app, and selecting it restores DPI 200.
  • printtarg argv uses that DPI (-t / -T) for the subsequent layout.
  • Built-in Standard RGB Photo remains 300 DPI.

Dependencies

None. Implement with issue 06 in the same PR.

| Field | Value | |---|---| | Labels | `Kind/Bug`, `Priority/Medium` | | Priority | Medium | | Milestone | v0.3.3 hotfix | | Related | #88 | | Branch | `fix/presets-dpi-xss` (from `development`) | | Pair with | [06-preset-xss.md](06-preset-xss.md) — same PR | ## Description `ProfilingPreset` includes `dpi`. The built-in **Fast RGB Draft** preset is `dpi: 150`. `collectCurrentSettingsAsPreset` hardcodes `dpi: 300` and `applyPreset` never touches `#tiffDpi`. Loading or saving a preset cannot round-trip Stage 2 resolution. ## Current behaviour - `applyPreset` writes colour space, patch count, white/black patches, instrument, page size, bit depth, colprof quality, and colprof algorithm. - `applyPreset` does not write `#tiffDpi`. - `collectCurrentSettingsAsPreset` sets `dpi: 300` regardless of the form. - Selecting **Fast RGB Draft (400 patches)** therefore still prints at whatever DPI the form last had (default 300). ## Proposed solution - In `applyPreset`, set `document.getElementById("tiffDpi").value = preset.dpi`. - In `collectCurrentSettingsAsPreset`, read `#tiffDpi` (fallback 300). - Validate the value is in the range already allowed by `printtarg` (72–600, or the existing control min/max). - Show DPI in the manage-presets subtitle next to patch count and page size. ## Files - `src/js/presets.js` - `src/index.html` — optional subtitle text ## Acceptance criteria - [ ] Selecting **Fast RGB Draft (400 patches)** sets the Stage 2 DPI control to 150. - [ ] Saving a custom preset at 200 DPI, reloading the app, and selecting it restores DPI 200. - [ ] `printtarg` argv uses that DPI (`-t` / `-T`) for the subsequent layout. - [ ] Built-in Standard RGB Photo remains 300 DPI. ## Dependencies None. Implement with issue 06 in the same PR.
gronod added this to the v0.3.3 Hot fixes milestone 2026-08-26 15:10:30 +01:00
gronod added the Kind/Bug
Reviewed
Confirmed
1
Priority
Medium
3
labels 2026-08-26 15:10:30 +01:00
gronod changed title from # bug(presets): applyPreset never applies TIFF DPI to bug(presets): applyPreset never applies TIFF DPI 2026-08-27 15:30:39 +01:00
Author
Owner

Resolved via PR #122. Preset DPI is now applied and collected round-trip, Stage 2 includes the DPI control, and printtarg uses the configured resolution.

Resolved via PR #122. Preset DPI is now applied and collected round-trip, Stage 2 includes the DPI control, and printtarg uses the configured resolution.
Sign in to join this conversation.