ImgGameLib
A light wrapper around pillow designed for the making of games through generating images.
This is useful in several scenarios in which you are very limited, such as with discord bots.
Example
# Import the module
import ImgGameLib as igl
# Create a canvas
canvas = igl.Canvas(
100,
100,
bg_color="#99CDDE",
gif=True
)
# Create a 100x100 rectangle at (50,50) and draw it
rect = igl.Rectangle(
50,
50,
100,
100
)
rect.draw(canvas)
# Move the rectangle by 5 pixels on the x axis
rect.move(x=5)
# Save the first frame to frame_1.png, and discard all animated frames
canvas.save("frame_1.png", no_gif=True)
canvas.discard()
# Move the rectangle by 10 pixels on the x axis, 10 times
for _ in range(10):
rect.move(x=10)
# Save the animation after that to animation.gif
canvas.save("animation.gif", loop=True, duration=20)
See the examples folder for more examples.
Metadata
Release files for ImgGameLib 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ImgGameLib-0.2.1.tar.gz | 7.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ImgGameLib-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 27.5 kB
Release files / ImgGameLib-0.2.1.tar.gz
| Download URL | ImgGameLib-0.2.1.tar.gz |
|---|---|
| Size | 7.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
677f761b994e95da5f3cd5cd337581498530f894a2091b70fca570c8120363a1
|
|
BLAKE2b-256 checksum How to use checksums |
90a4fb53777f0b6f78a48f264eb8f83fe391518094214926e677c7a8b1f2a865
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.6
|
Release files / ImgGameLib-0.2.1-py3-none-any.whl
| Download URL | ImgGameLib-0.2.1-py3-none-any.whl |
|---|---|
| Size | 20.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
15bd089360f9e02512d06fb8d65f9104e0bbb7778c37e43624dd7d64f5eb9b37
|
|
BLAKE2b-256 checksum How to use checksums |
98a82945dfa3d702ad7e6c4012fe0614f4dd88b8b1a3db39853269b124663dc6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.6
|