simple graphics animation video generator
Project description
Graphics Maker (Python)
What
This is a simple python package that provides a way to generate flat design animation videos. It allows for simple shapes and transitions of location, rotation and scale.
Why
I was tired of building animations with other tools and getting choppy/unsatisfactory results. I'm also too cheap and lazy to pay for an expensive tool, and then have to learn all the intricacies. So I just made this for myself.
Dependencies:
In order to use this package you need to have some libraries installed for libcairo2. Google what you need to install for your distro. Also for images we need PIL.
How to use:
Install the package in your python environment:
pip install graphics-maker
The following steps should be taken to create an animation:
NOTE: ALL LOCATION/DIMENSION BASED VALUES SHOULD BE GIVEN AS PERCENTAGES OF THE VIDEO DIMENSIONS.
- Instantiate an instance of
GraphicsMaker
with the desired settings.
Argument | Description |
---|---|
name | File name |
w | Video width |
h | Video height |
fps | FPS default:60 |
output_dir | The directory to output the result to default:./outputs/ |
output_type | The video type output (mp4/gif) default:mp4 |
- Create and add Objects to the GraphicsMaker with the desired type, location, rotation, scale and colour.
- Add AnimationData instances to the GraphicsMaker for objects you'd like to animate within a given timeframe.
- Run
.generate_animation()
on the GraphicsMaker instance.
Supported object types
- Circle
- Rectangle
- Polygon
- Text
- Image
- Custom Draw (provide your own draw function)
TODO:
- More documentation on capabilities.
- Radial gradient transition.
- Fix linear gradient transition of odd angle.
Examples
Example programs using the lib are in examples/
. Feel free to run it locally and generate the videos! But here they are as well:
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for graphics_maker-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d55029378913f6db701a9baf113c9fb02cac7f2ccecb9ec4ea4bca5735fa8f0 |
|
MD5 | 7463255eafb3b6b9be4cedeed2ee0e57 |
|
BLAKE2b-256 | 7a9be642ba7a43fbd1fe1bd36b9f52cf8ea87b6d216e60c49607971dde0f7c8b |