Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add -90 rotation degree #285

Merged
merged 1 commit into from
Jan 17, 2025
Merged

Add -90 rotation degree #285

merged 1 commit into from
Jan 17, 2025

Conversation

hbakouane
Copy link
Contributor

@hbakouane hbakouane commented Jan 15, 2025

Hey, I am not so familiar with the package, but when using the orientation chained method, I cannot pass a degree other than 0, 90, 180 and 270 since the argument is type hinted to the enum Spatie\Image\Enums\Oritentation, so I thought adding a new case RotationMinus90 would be a good idea.

Image::load($media->getPath())->orientation($request->get('direction') === 'left' ? -90 : Orientation::Rotate90)->base64();

@freekmurze freekmurze merged commit 06cf293 into spatie:main Jan 17, 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