Skip to content

Add named RGB export presets with longest-edge sizing - #319

Open
Rex16200513 wants to merge 3 commits into
robbietilton:mainfrom
Rex16200513:feature/export-presets
Open

Rex16200513 wants to merge 3 commits into
robbietilton:mainfrom
Rex16200513:feature/export-presets

Conversation

@Rex16200513

Copy link
Copy Markdown
Contributor

Export As can remember JPEG quality, but repeated deliveries still require setting the format and dimensions by hand. Add named presets for RGB PNG, JPEG, TIFF and PDF, so a configuration such as “Web JPEG, longest edge 1600 px” can be reused across documents.

The Export As sheet gains a Presets menu, Save Preset popover and Delete Preset submenu. Presets persist locally and store format, JPEG quality, background color, and either original dimensions or a longest-edge limit. A limit preserves proportions and never enlarges smaller images. Applying a preset updates the existing preview and leaves all controls editable. Names must be unique, nonblank and at most 80 characters.

This first version excludes CMYK profiles, 16-bit PNG, HDR, animation and document-specific channel mappings; Save Preset is disabled for those settings. Applying a screen preset explicitly selects RGB/8-bit settings. Presets do not change the document format.

Allow exports smaller than 1% so a large source can honor a small longest-edge limit. Remove the redundant format-change resize, which would otherwise recalculate a preset's scale from rounded width and distort the requested size on extremely narrow images.

Validation:

  • Three Swift Testing tests passed in an isolated package using the actual ExportPreset.swift, DocumentLimits.swift and ExportPresetTests.swift: orientation/no-upscale/original-size rules, persistence/deletion, invalid/corrupt preferences.
  • Swift syntax parsing and git diff whitespace checks passed.
  • Full application build, integrated test target and visual UI verification remain unperformed: this machine has Command Line Tools but no full Xcode. Submitted as a draft for that reason.

Related: #268 (export templates and reusable export settings).

@Rex16200513
Rex16200513 marked this pull request as ready for review October 28, 2026 05:07
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.

1 participant