# 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,
)
Raw data
{
"_id": null,
"home_page": "https://github.com/flexrobotics/roboflex_util_png",
"name": "roboflex.util.png",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "png,robotics,middleware,flexbuffers,python,c++,c++20",
"author": "Colin Prepscius",
"author_email": "colinprepscius@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/ca/d9/72e455ae3da49b3eaa3839fe093df613f71674ff2f078902a7f8ca503d9c/roboflex.util.png-0.1.3.tar.gz",
"platform": null,
"description": "# roboflex.util.png\n\nRoboflex support for png compression to file and memory, and png decompression from memory.\n\nUseful for compressing images over slow transports (wifi, etc).\n\n## System Dependencies\n\n None! We build lodepng from source...\n\n## pip install\n\n pip install roboflex.util.png\n\n## Import\n\n import roboflex.util.png as rup\n\n## Nodes\n\nThere 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.\n\n # all parameters are optional\n c = rup.PNGCompressor(\n\n # in the incoming message, where to find the rgb tensor\n image_key = \"rgb\",\n\n # in the outgoing message, where to place the jpeg data\n output_key = \"png\", \n\n # If this is provided, will ALSO write jpeg files with this \n # prefix, with a variation of the date and time as the suffix.\n filename_prefix = \"\",\n\n # name of the node\n name = \"PNGCompressor\",\n\n # prints internal info\n debug = False,\n )\n\n... and ...\n\n c = rup.PNGDecompressor(\n\n # in the incoming message, where to find the png data as a blob\n input_key = \"png\",\n\n # in the outgoing message, where to place the rgb data as a tensor\n output_key = \"rgb\", \n\n # name of the node\n name = \"PNGDecompressor\",\n\n # prints internal info\n debug = False,\n )\n\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Roboflex util png Library",
"version": "0.1.3",
"project_urls": {
"Homepage": "https://github.com/flexrobotics/roboflex_util_png"
},
"split_keywords": [
"png",
"robotics",
"middleware",
"flexbuffers",
"python",
"c++",
"c++20"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "cad972e455ae3da49b3eaa3839fe093df613f71674ff2f078902a7f8ca503d9c",
"md5": "bdf5a1298e6e06ea9e52a1ee97316a45",
"sha256": "78f946ddf012e53eda208c3511ae06cbbf27c5154db4e201ef2b12299dc53fb9"
},
"downloads": -1,
"filename": "roboflex.util.png-0.1.3.tar.gz",
"has_sig": false,
"md5_digest": "bdf5a1298e6e06ea9e52a1ee97316a45",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 8022,
"upload_time": "2023-11-04T01:32:48",
"upload_time_iso_8601": "2023-11-04T01:32:48.919169Z",
"url": "https://files.pythonhosted.org/packages/ca/d9/72e455ae3da49b3eaa3839fe093df613f71674ff2f078902a7f8ca503d9c/roboflex.util.png-0.1.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-11-04 01:32:48",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "flexrobotics",
"github_project": "roboflex_util_png",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "roboflex.util.png"
}