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

Update VideoClip.py #2270

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Update VideoClip.py #2270

wants to merge 1 commit into from

Conversation

aaa3334
Copy link

@aaa3334 aaa3334 commented Dec 2, 2024

Adding in a new optional parameter bg_radius. This parameter allows users to round the edges of the background text box so it is not sharp cornered.

This new parameter is optional and utilises the pil libraries rounded_rectangle.

https://pillow.readthedocs.io/en/stable/reference/ImageDraw.html#PIL.ImageDraw.ImageDraw.rounded_rectangle

This has been around since pil 8.2.
Moviepy requires: "pillow>=9.2.0,<11.0",
Therefore, this is compatible.

Note I have extensively tested on my local computer. I decided to make the change as it was much simpler than me manually creating this on my end (I have also seen others eg. on reddit with the same issue).

I have not done many PR's before - please let me know if I have not done this correctly. I tried to follow the documentation but as I am newer to this with git I am unsure if I did it in the right place etc.

  • [ x] I have added suitable tests demonstrating a fixed bug or new/changed feature to the test suite in tests/ (I did this on my local computer but am unsure how to add it for this PR)
  • [ x] I have properly documented new or changed features in the documentation or in the docstrings
  • [ x] I have properly explained unusual or unexpected code in the comments around it

Adding in a new optional parameter bg_radius. This parameter allows users to round the edges of the background text box so it is not sharp cornered.
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.

1 participant