Skip to main content

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.

  1. 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
  1. Create and add Objects to the GraphicsMaker with the desired type, location, rotation, scale and colour.
  2. Add AnimationData instances to the GraphicsMaker for objects you'd like to animate within a given timeframe.
  3. Run .generate_animation() on the GraphicsMaker instance.

Supported object types

  1. Circle
  2. Rectangle
  3. Polygon
  4. Text
  5. Image
  6. 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:

https://github.com/DavidOberholzer/graphics-maker/assets/20847795/72428e27-dd3d-4585-83f6-23776edaae99

https://github.com/DavidOberholzer/graphics-maker/assets/20847795/55603c97-59d8-485c-966c-0ccf743d93c4

https://github.com/DavidOberholzer/graphics-maker/assets/20847795/04dc3927-9b7d-4abd-b37a-3f5f945617f3

Metadata

Release files for graphics-maker 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for graphics-maker 0.2.1
File Size Uploaded
graphics-maker-0.2.1.tar.gz 8.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for graphics-maker 0.2.1
File Interpreter ABI Platform
graphics_maker-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 17.6 kB

Release files / graphics-maker-0.2.1.tar.gz

Download URL graphics-maker-0.2.1.tar.gz
Size 8.8 kB
Tags Source
SHA-256 checksum
How to use checksums
010b85c45c206a9f0f280fe40be1fb2fa5fa56f87f12a4a92ae3a2dbe6c585bd
BLAKE2b-256 checksum
How to use checksums
418f42a8b4169b7fa5d83069f52a448e66341e158e78dbf15af1dcb3fb743fca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.10

Release files / graphics_maker-0.2.1-py3-none-any.whl

Download URL graphics_maker-0.2.1-py3-none-any.whl
Size 8.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7d55029378913f6db701a9baf113c9fb02cac7f2ccecb9ec4ea4bca5735fa8f0
BLAKE2b-256 checksum
How to use checksums
7a9be642ba7a43fbd1fe1bd36b9f52cf8ea87b6d216e60c49607971dde0f7c8b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.10

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2.0

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page