Save turtle images as jpg or png
Project description
This is a fork of WojciechMula/canvas2svg which uses svglib, reportlab and Pillow to convert things drawn in Python’s turtle library to png or jpg files.
The list of supported items is the same as canvas2svg.
Supported items:
lines
lines with arrows
polygons
smoothed lines and polygons
ovals (i.e. circle & ellipse)
arcs (all kind, i.e. ARC, CHORD, PIESLICE)
rectangles
text (unwrapped only i.e. attribute width = 0)
Unsupported items:
images
bitmaps
windows
Stipples are not applied.
Public functions
save_png(filepath: str, margin=10) -> None:
filepath: The filepath to save the output image to
margin: The number of pixels around the bounding box of image elements to include
save_jpg(filepath: str, margin=10) -> None:
filepath: The filepath to save the output image to
margin: The number of pixels around the bounding box of image elements to include
Original repository: https://github.com/WojciechMula/canvas2svg
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file turtle2img-1.1.5.tar.gz.
File metadata
- Download URL: turtle2img-1.1.5.tar.gz
- Upload date:
- Size: 9.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ba7d4a554daec6df2219367e2e840aaf7243a858ecf6e10063d17f054ed9b740
|
|
| MD5 |
fc94bc3ccc727623a42388ae1ac40b31
|
|
| BLAKE2b-256 |
dd4c7214b969c1da2612ff2449fe914e4806982a73c18ae90d30493f9406e48f
|
File details
Details for the file turtle2img-1.1.5-py3-none-any.whl.
File metadata
- Download URL: turtle2img-1.1.5-py3-none-any.whl
- Upload date:
- Size: 14.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
11e472a3a0e9cf384e59d488762f3202302c19889ce49ce49a3a77fa693bcbff
|
|
| MD5 |
5f1b859c31f31a28eb509f955e168e77
|
|
| BLAKE2b-256 |
7628291506e8dbf6c36a6c9e35eae8f520953d5f2dabf4b0331eb067e71e5356
|