roboflex.util.png
Roboflex support for png compression to file and memory, and png decompression from memory.
Useful for compressing images over slow transports (wifi, etc).
System Dependencies
None! We build lodepng from source...
pip install
pip install roboflex.util.png
Import
import roboflex.util.png as rup
Nodes
There are two complementary nodes: PNGCompressor, which can turn rgb tensors into pngs in memory, and PNGDecompressor, which does the opposite. Useful either for writing rgb tensors to files, or compressing them.
# all parameters are optional
c = rup.PNGCompressor(
# in the incoming message, where to find the rgb tensor
image_key = "rgb",
# in the outgoing message, where to place the jpeg data
output_key = "png",
# If this is provided, will ALSO write jpeg files with this
# prefix, with a variation of the date and time as the suffix.
filename_prefix = "",
# name of the node
name = "PNGCompressor",
# prints internal info
debug = False,
)
... and ...
c = rup.PNGDecompressor(
# in the incoming message, where to find the png data as a blob
input_key = "png",
# in the outgoing message, where to place the rgb data as a tensor
output_key = "rgb",
# name of the node
name = "PNGDecompressor",
# prints internal info
debug = False,
)
Metadata
Release files for roboflex.util.png 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 | Provenance | Actions |
|---|---|---|---|---|
| roboflex.util.png-0.1.3.tar.gz | 8.0 kB | Without provenance | Details for roboflex.util.png-0.1.3.tar.gz |
Release files / roboflex.util.png-0.1.3.tar.gz
| Download URL | roboflex.util.png-0.1.3.tar.gz |
|---|---|
| Size | 8.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
78f946ddf012e53eda208c3511ae06cbbf27c5154db4e201ef2b12299dc53fb9
|
|
BLAKE2b-256 checksum How to use checksums |
cad972e455ae3da49b3eaa3839fe093df613f71674ff2f078902a7f8ca503d9c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|
Security for roboflex.util.png 0.1.3
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.