-
Notifications
You must be signed in to change notification settings - Fork 30
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 more options for the background #7
base: master
Are you sure you want to change the base?
Conversation
It would be awesome to have the background color of the video transparent. Is this possible? |
@godomac mp4 does not support transparent background colors. That would require a different raw video format like AVI or QuickTime (.mov). I suggest opening a feature request, that's way out of scope of this PR. |
@@ -130,17 +147,18 @@ def draw_env(envs, out, fg_colors, bg_color, size): | |||
pad = pad_ratio * width | |||
delta = 2 * pad + width | |||
|
|||
ctx.translate(*offset) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do you need this offset here ?
image = image.resize(image.width + 1, image.height) | ||
if image.height % 2 is 1: | ||
image = image.resize(image.width, image.height + 1) | ||
output_size = image.width, image.height |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure we should replace the output size with tjhe image size, maybe we should rather keep the video width and height controlled by the params, and resize the image given as background ? or maybe add a flag --use_background_image_size
Passing image size as tuple & fixing SyntaxWarning on literal identity check
This adds more options to specify both the background color as well as an image as the background. Also additionally the ability to set the opacity of the bars.
Options added: