A width on its own means that width - #32
Merged
Merged
Conversation
Resizing filled the side nobody named in with the original, then handed both to min(). The unasked side always has a ratio of exactly 1, so it silently became the floor: asking for 1600 wide on an 800 pixel picture scaled by min(2, 1) and gave back 800, which reads as a resize that did nothing at all. Only the sides that were actually asked for decide the scale now. The box a crop or a pad is fitted into still uses the original for the side nobody named - that part was right. Downscaling, which is what everybody was doing, behaves exactly as before, and both directions are now tested. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018H9CZxWumc3ryumgEHd578
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resizing filled the side nobody named in with the original and handed both to
min(). The unasked side always has a ratio of exactly 1, so it silently became the floor: asking for 1600 wide on an 800 pixel picture scaled bymin(2, 1)and gave back 800 — a resize that did nothing.Only the sides actually asked for decide the scale now.
cropCenterhad the same shape of bug throughmax(). The box a crop or a pad is fitted into still uses the original for the side nobody named — that part was right.The preset editor's Resize action defaults to exactly this shape (a width, no height), so it was reachable in one click. From the CLI it needs
--resize 1600x, which the parser already accepted.Test plan
swift test— 349 green, three new: upscale to a width, downscale to a width, and a box where the wide side is what fits800x600 --resize 1600x→1600x1200🤖 Generated with Claude Code
https://claude.ai/code/session_018H9CZxWumc3ryumgEHd578