Python bindings for MTPNG library
Project description
Python mtpng
Python bindings for the MTPNG library, a parallelized PNG encoder in Rust by Brion Vibber.
Usage
import pymtpng
...
# Encode numpy uint8 array to PNG
with open("image_uint8.png", "wb") as fh:
pymtpng.encode_png(image_uint8, fh)
...
# Encode numpy uint16 array to PNG
with open("image_uint16.png", "wb") as fh:
pymtpng.encode_png(image_uint16, fh)
...
# Customize encoding options
pymtpng.encode_png(
image, fh,
filter=pymtpng.Filter.Adaptive,
compression_level=pymtpng.CompressionLevel.Fast,
strategy=pymtpng.Strategy.Huffman,
)
...
# Store key-value pairs as iTXt chunks
pymtpng.encode_png(image, fh, info={"Hello": "World"})
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
pymtpng-1.0.4.tar.gz
(6.0 kB
view details)
Built Distributions
File details
Details for the file pymtpng-1.0.4.tar.gz
.
File metadata
- Download URL: pymtpng-1.0.4.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 26e544687f00f460cc73817f59e1abd88529018dfbc9bdc9e9f0b11b9b4ca18f |
|
MD5 | 7973badb06065079ea583a2a1149a534 |
|
BLAKE2b-256 | d8e1bb094d2f46a241ca005648dccc20fb7bbfccc1557e74c3fb506669de8257 |
File details
Details for the file pymtpng-1.0.4-cp312-abi3-win_amd64.whl
.
File metadata
- Download URL: pymtpng-1.0.4-cp312-abi3-win_amd64.whl
- Upload date:
- Size: 219.1 kB
- Tags: CPython 3.12+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9769e6ae738309e26f4d852d197259aee3daf3d73517bdbf135db0333b3b4eb6 |
|
MD5 | b52f70de4bdce7dca7787bd7024bc8c4 |
|
BLAKE2b-256 | fd11864d9aa2d64a62f1bfa98ce785bbd35a17de05a07119ed45354fca811f8f |
File details
Details for the file pymtpng-1.0.4-cp311-cp311-win_amd64.whl
.
File metadata
- Download URL: pymtpng-1.0.4-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 220.4 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6aec031f73868976845a8401d9eb470c8e419963f201f448612fd7079af088e |
|
MD5 | 968d2b106e896c259649ac20446bfc62 |
|
BLAKE2b-256 | bb057a3f9d375b5f81e51a4c7164e3caf1e052eea775044758cf5737030275d4 |
File details
Details for the file pymtpng-1.0.4-cp310-cp310-win_amd64.whl
.
File metadata
- Download URL: pymtpng-1.0.4-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 220.5 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90bec4b7cbb6616c9176219cc5ef08245021cb3230f46f99a36aada8893a61c5 |
|
MD5 | 160dbab319e2e1b3e941e6e72bce4b9b |
|
BLAKE2b-256 | 37466e004e86419e7df82a8eb7119a6c019934d700e863ab3c2e5afb8e4c3f04 |
File details
Details for the file pymtpng-1.0.4-cp39-cp39-win_amd64.whl
.
File metadata
- Download URL: pymtpng-1.0.4-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 220.7 kB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f7515b1cc1b688cdcc7d8d758be1d47a6e1fbb23de88b6dbdb4c76000a8975f |
|
MD5 | 976313c983fa6d6bd9ceef00521777ab |
|
BLAKE2b-256 | 57385e554915b3341124ef9ded990545d904fbf8c27c65a0ff6c5f29215f0676 |