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.2.tar.gz
(7.0 kB
view hashes)
Built Distributions
pymtpng-1.0.2-cp39-cp39-win_amd64.whl
(254.8 kB
view hashes)
Close
Hashes for pymtpng-1.0.2-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15820a02199fd322a4fc687546ed9c6b0fac1eb3b3860f45fdc7e40751d7eca5 |
|
MD5 | 6fb620e18a140321a515f1562b2ecab1 |
|
BLAKE2b-256 | 066b216d5a6770f668586dcb3c67a3580c4420e49a46ab2c8aa6bf6cc564f977 |
Close
Hashes for pymtpng-1.0.2-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cac946695cc6b12de81006a2dec48bddac1ab6f25128c82538480898b9c92c85 |
|
MD5 | b137621cc954cc63ff1e7cf296c1fdcb |
|
BLAKE2b-256 | 7ea0bb6a35b0e1ad8cd7079aee65b829f730f559a02063ed43200a3e416a90d0 |
Close
Hashes for pymtpng-1.0.2-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a31e169141c79304e60bb5bedaa019e32e45cf51f954a1f289fb6327170db875 |
|
MD5 | 00e1828391dabd59c9c3197acc8cc005 |
|
BLAKE2b-256 | ddef25c63569b357c6d712eef06d81008cb1448e792d353e9361d8da20803eee |
Close
Hashes for pymtpng-1.0.2-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3539452147ba4e44ba18dd3abed403ad9b81ee3ed2426aa005d685794bc2e432 |
|
MD5 | b07fbcd4104ff3fe92a5ae88c7ec7ef2 |
|
BLAKE2b-256 | 27a552a35d0b775e199f28369011d6e66b7e6d84cdbffd0c1f33162e9a1f0ea9 |