Skip to content

Add shadow effect to libopenshot #999

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

Open
wants to merge 23 commits into
base: develop
Choose a base branch
from

Conversation

aperture147
Copy link
Contributor

Currently there are no drop shadow effect implemented in libopenshot. To achieve that, people usually do this trick:

  1. Duplicate the clip that requires shadow dropping
  2. Use Brightness effect to make the duplicated clip black
  3. Use Blur effect to make the black clip above looked like a shadow
  4. Place the Clip below and a bit offset of the original clip

This approach has two disadvantages:

  1. Cannot change the color of the shadow: User might want to change the shadow color to a shift the color and no Hue or Chromakey could shift the the color of black
  2. Inconvenient to use: User has to duplicate the clip, rearrange and modify effects on it. This is not an easy task to do if user has more than one Clip to drop shadow (even when managing them programmatically)

My implementation of Shadow effect could solves those disadvantages by two features:

  1. No extra Clip required.
  2. Shadow color could be keyframed. User could change the color freely

Please check this out! All contributions are appreciated!

@aperture147
Copy link
Contributor Author

This effect uses code from #998, please also check it out @jonoomph!

Copy link

codecov bot commented Mar 25, 2025

Codecov Report

Attention: Patch coverage is 25.17986% with 104 lines in your changes missing coverage. Please review.

Project coverage is 54.59%. Comparing base (e76a3de) to head (bb037c9).

Files with missing lines Patch % Lines
src/effects/Shadow.cpp 0.00% 95 Missing ⚠️
src/Frame.cpp 80.00% 5 Missing ⚠️
src/EffectInfo.cpp 0.00% 3 Missing ⚠️
src/effects/Shadow.h 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #999      +/-   ##
===========================================
- Coverage    54.89%   54.59%   -0.30%     
===========================================
  Files          185      187       +2     
  Lines        16800    16905     +105     
===========================================
+ Hits          9222     9229       +7     
- Misses        7578     7676      +98     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@aperture147
Copy link
Contributor Author

Hi, this PR is related to #998. Please check it out first. I also included test cases for that pull request!

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