Skip to content

Crop: custom aspect ratios and a 9:20 preset - #241

Merged
robbietilton merged 3 commits into
robbietilton:mainfrom
Lens-lzy:feature/custom-crop-ratio
Oct 26, 2026
Merged

robbietilton merged 3 commits into
robbietilton:mainfrom
Lens-lzy:feature/custom-crop-ratio

Conversation

@Lens-lzy

@Lens-lzy Lens-lzy commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

The Crop tool currently offers only fixed aspect ratios. This adds a 9:20 preset and a Custom… entry that opens a small width:height editor, accepting positive numbers including decimals. Confirming a value displays it in the ratio menu and reshapes the crop frame; dismissing the editor leaves the current ratio unchanged.

For example, choosing 2.5:1 on a 900 × 600 canvas gives a 900 × 360 crop frame. Invalid, non-finite, zero, negative, and unrepresentable ratios cannot be applied. Extreme valid ratios resize within the existing whole-pixel document limits. Free, Original, and the existing presets remain available.

Closes #165.

Validation:

  • Built and tested with Xcode 26.2 on Apple silicon, macOS 27.2.
  • All 541 CompositorTests passed: 534 in the main run and 7 window tests run separately, following the CI split.
  • CropTests: all 9 tests passed, including two new tests in the existing file for input validation, frame sizing, extreme ratios, and existing choices.
  • Verified in the running app: the Custom… popover opens with editable text; 0:20 disables Apply; 2.5:1 produces 900 × 360; the 9:20 preset produces 900 × 2000.

@Lens-lzy

Copy link
Copy Markdown
Contributor Author

Hi @robbietilton — just a gentle bump on this one. It's been about a week with CI green; happy to adjust anything if you have feedback. Thanks!

robbietilton and others added 2 commits October 25, 2026 21:38
…al renamed Canvas

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@robbietilton
robbietilton merged commit f7ad0f9 into robbietilton:main Oct 26, 2026
@robbietilton

Copy link
Copy Markdown
Owner

Merged, thank you @Lens-lzy! Custom… is a great fit: one menu entry covers 4:5, 3:2, 2.35:1 and anything else people need, and the validation and tests were thorough.

A few small changes before merging, to keep the menu short:

  • 9:20 is gone as a preset, since Custom… covers it. In its place is 2.39:1, the widescreen cinema ratio.
  • The ratios are grouped by shape with dividers: Free and Canvas, then square, then wide (4:3, 16:9, 2.39:1), then tall (3:4, 9:16), then Custom….
  • "Original" is now called "Canvas", which says more plainly whose proportions it keeps.

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.

Feature request: Support 9:20 and custom aspect ratios

2 participants