Skip to content

Conversation

@Ayoub-Mabrouk
Copy link
Contributor

  • Added early returns for invalid width and height inputs
  • Ensured that invalid width or height throws appropriate exceptions before resizing
  • Simplified logic for resizing dominant width and height

- Reorganize logic with early return for invalid height
- Extract constraint checks to variables for better readability
- Reduce nested conditions by calculating new dimensions upfront
- Maintain existing behavior for DoNotUpsize and PreserveAspectRatio
- Added early returns for invalid width and height inputs
- Ensured that invalid width or height throws appropriate exceptions before resizing
- Simplified logic for resizing dominant width and height
@freekmurze freekmurze merged commit 381f636 into spatie:main Apr 24, 2025
1 of 4 checks passed
@freekmurze
Copy link
Member

Thanks!

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.

2 participants