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

Using animated gif with transparent background #1780

Closed
dviner opened this issue May 30, 2022 · 1 comment
Closed

Using animated gif with transparent background #1780

dviner opened this issue May 30, 2022 · 1 comment

Comments

@dviner
Copy link

dviner commented May 30, 2022

I'm trying to import an animated gif with a transparent background. When I use the ImageClip, the animation of the image does not appear. When I use the VideoFileClip, the animation does appear, but the video has a solid white background rather than the transparent background which is what's in the gif.

How do I use the image in such a way that both the background is transparent and the animation displays?

I'm attaching the animated gif file, so that you can see it.
red-splotch-2

@dviner
Copy link
Author

dviner commented May 31, 2022

I believe that I solved this issue by adding the has_mask=True param when I construct the VideoFileClip...

splotch = VideoFileClip('red-splotch-50w.gif', has_mask=True)

This seems to solve the issue.

@dviner dviner closed this as completed May 31, 2022
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

No branches or pull requests

1 participant