gcode-thumbnail-tool
A small tool to analyse and extract thumbnails rendered into GCODE files.
Installation
pip install gcode-thumbnail-tool
Usage
As a Python library
import gcode_thumbnail_tool as gtt
path = "/path/to/a/file.gcode"
thumbnails = gtt.extract_thumbnails_from_gcode_file(path)
if result:
print(
f'Found {len(result.images)} thumbnails in {args.path}, in format "{result.extractor}":'
)
for image in result.images:
print(f"\t{image.format} @ {image.width}x{image.height}")
else:
print(f"Didn't find any thumbnails in {args.path}")
See gcode_thumbnail_tool.py:main and tests/test_api.py for more usage examples.
As a command line tool
$ gcode-thumbnail-tool
usage: gcode-thumbnail-tool [-h] [--verbose] {extract,analyse} ...
A small CLI tool to extract thumbnail images from GCODE files.
positional arguments:
{extract,analyse}
extract extracts thumbnails from the provided file as PNGs
analyse provides information on the GCODE file's thumbnails
options:
-h, --help show this help message and exit
--verbose, -v increase logging verbosity
extract
$ gcode-thumbnail-tool extract --help
usage: gcode-thumbnail-tool extract [-h] [-o OUTPUT] path
positional arguments:
path path to the GCODE file
options:
-h, --help show this help message and exit
-o OUTPUT, --output OUTPUT
output path for the extracted thumbnails
analyse
$ gcode-thumbnail-tool analyse --help
usage: gcode-thumbnail-tool analyse [-h] path
positional arguments:
path path to the GCODE file
options:
-h, --help show this help message and exit
Example
$ gcode-thumbnail-tool analyse tests/_files/prusa_2.9.3.gcode
Found 4 thumbnails in tests/_files/prusa_2.9.3.gcode, in format "generic":
PNG @ 16x16
PNG @ 220x124
QOI @ 64x64
JPEG @ 64x64
Acknowledgements
gcode-thumbnail-tool is based on the Slicer Thumbnails OctoPrint Plugin by jneilliii.
Big thanks to him and all the contributors!
Metadata
Release files for gcode-thumbnail-tool 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| gcode_thumbnail_tool-0.1.3.tar.gz | 20.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gcode_thumbnail_tool-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 40.0 kB
Release files / gcode_thumbnail_tool-0.1.3.tar.gz
| Download URL | gcode_thumbnail_tool-0.1.3.tar.gz |
|---|---|
| Size | 20.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ec7c0e2a36797abb1ebfa4514c0044aff6d723828b5d90be067bac3a4dc8466c
|
|
BLAKE2b-256 checksum How to use checksums |
0a7ee8d3b837d2d41018a4414e9aab70f1c686a1552043122468854618a1006d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 9, 2026.
Transparency logRelease files / gcode_thumbnail_tool-0.1.3-py3-none-any.whl
| Download URL | gcode_thumbnail_tool-0.1.3-py3-none-any.whl |
|---|---|
| Size | 19.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
36f8370419ec99641da99a71a850d52a4b8b9f8705d550469371651dc2a87255
|
|
BLAKE2b-256 checksum How to use checksums |
f5cde716d5197596fdaccb80fca59f99d91dfd788007c792769c17a8e40177f8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 9, 2026.
Transparency log