Fix `config.background_opacity=0` failing
Setting background_transparency=0.0 should have the same effect than setting transparent=True. The output format must be compatible with transparency (.mov, .webm). Otherwise ffpmeg fails.
This patch ensures that background_transparency=0.0 triggers the change of the output format. Also a WARNING is raised about the change in the output format.
I want to thank @SirJamesClarkMaxwell for inspiring me to tackle this issue.
Overview: What does this pull request change?
Motivation and Explanation: Why and how do your changes improve the library?
Links to added or changed documentation pages
Further Information and Comments
Reviewer Checklist
- [ ] The PR title is descriptive enough for the changelog, and the PR is labeled correctly
- [ ] If applicable: newly added non-private functions and classes have a docstring including a short summary and a PARAMETERS section
- [ ] If applicable: newly added functions and classes are tested
Wouldn't actually any value for background_opacity smaller than 1 mean that the video should be rendered with transparency?
I've pushed some fixes for the behavior of config.background_opacity strictly between 0 and 1, and added an explicit test for the case of config.background_opacity == 0.5.
It would be great if someone could cross-review my changes, otherwise I'm happy to get this merged.
I've now properly fixed the logger situation -- sorry, this should probably have been a separate PR. Should be easiest to review by looking at c800ba1 and 78dfd41 separately.