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

Video Cropping: Handle element rotation #12203

Closed
timarney opened this issue Sep 1, 2022 · 3 comments
Closed

Video Cropping: Handle element rotation #12203

timarney opened this issue Sep 1, 2022 · 3 comments
Labels
Elements: Video Group: Media Group: Video Optimization Media transcoding, compression and cropping P3 Nice to have Type: Enhancement New feature or improvement of an existing feature

Comments

@timarney
Copy link
Contributor

timarney commented Sep 1, 2022

Feature Description

PR #12156 handles off-screen cropping but not for rotated elements

Per

Would be nice to cater for element rotation here as well. Maybe in a follow-up, but I think we can avoid using custom checks for each side of the element here. Basically calculating the area of two overlapping rectangles.

This issue covers added detection for rotated off-canvas elements

#12156 (comment)

Alternatives Considered

Additional Context

@timarney timarney added Type: Enhancement New feature or improvement of an existing feature Pod: WP Elements: Video Group: Video Optimization Media transcoding, compression and cropping Group: Media labels Sep 1, 2022
@swissspidy swissspidy added the P2 Should do soon label Sep 2, 2022
@swissspidy
Copy link
Collaborator

Related: #8715

@swissspidy swissspidy changed the title Media: Video Cropping Prototype handle element rotation Video Cropping: Handle element rotation Sep 2, 2022
@swissspidy
Copy link
Collaborator

Som example cases that would need to be covered when having to crop off-screen parts of a video:

Screenshot 2022-09-20 at 14 00 57

Screenshot 2022-09-20 at 14 00 01

@miina Do we have any existing utils to help calculate this? Perhaps with SAT?

@miina
Copy link
Contributor

miina commented Sep 21, 2022

https://www.npmjs.com/package/sat#satresponse - this is the information we get when testing two polygons colliding, looks like currently it doesn't reveal the collision points. Also found this issue in the repo with a link to an article about how to potentially get those points (didn't have time to check the link in detail right now):
jriecken/sat-js#63

@swissspidy swissspidy added P3 Nice to have and removed P2 Should do soon labels Oct 2, 2022
@swissspidy swissspidy removed the Pod: WP label Feb 2, 2023
@swissspidy swissspidy closed this as not planned Won't fix, can't repro, duplicate, stale May 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Elements: Video Group: Media Group: Video Optimization Media transcoding, compression and cropping P3 Nice to have Type: Enhancement New feature or improvement of an existing feature
Projects
None yet
Development

No branches or pull requests

3 participants