# roboflex.util.jpeg
Roboflex support for jpeg compression to file and memory, and jpeg decompression from memory.
Useful for compressing images over slow transports (wifi, etc).
## System Dependencies
None! We build jpeg-compression from source...
## pip install
pip install roboflex.util.jpeg
## Import
import roboflex.util.jpeg as ruj
## Nodes
There are two complementary nodes: `JPEGCompressor`, which can turn rgb tensors into jpegs in memory, and `JPEGDecompressor`, which does the opposite. Useful either for writing rgb tensors to files, or compressing them (NOTE jpeg is lossy).
# all parameters are optional
c = ruj.JPEGCompressor(
# 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 = "jpeg",
# 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 = "JPEGCompressor",
# prints internal info
debug = False,
)
... and ...
c = ruj.JPEGDecompressor(
# in the incoming message, where to find the jpeg data as a blob
input_key = "jpeg",
# in the outgoing message, where to place the rgb data as a tensor
output_key = "rgb",
# name of the node
name = "JPEGDecompressor",
# prints internal info
debug = False,
)
Raw data
{
"_id": null,
"home_page": "https://github.com/flexrobotics/roboflex_util_jpeg",
"name": "roboflex.util.jpeg",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "jpeg,robotics,middleware,flexbuffers,python,c++,c++20",
"author": "Colin Prepscius",
"author_email": "colinprepscius@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/16/9e/e9dcf7e91e1597ce3c40e5c948f378acc6495f5d812f129c480eaa7cd1c6/roboflex.util.jpeg-0.1.4.tar.gz",
"platform": null,
"description": "# roboflex.util.jpeg\n\nRoboflex support for jpeg compression to file and memory, and jpeg decompression from memory.\n\nUseful for compressing images over slow transports (wifi, etc).\n\n## System Dependencies\n\n None! We build jpeg-compression from source...\n\n## pip install\n\n pip install roboflex.util.jpeg\n\n## Import\n\n import roboflex.util.jpeg as ruj\n\n## Nodes\n\nThere are two complementary nodes: `JPEGCompressor`, which can turn rgb tensors into jpegs in memory, and `JPEGDecompressor`, which does the opposite. Useful either for writing rgb tensors to files, or compressing them (NOTE jpeg is lossy).\n\n # all parameters are optional\n c = ruj.JPEGCompressor(\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 = \"jpeg\", \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 = \"JPEGCompressor\",\n\n # prints internal info\n debug = False,\n )\n\n... and ...\n\n c = ruj.JPEGDecompressor(\n\n # in the incoming message, where to find the jpeg data as a blob\n input_key = \"jpeg\",\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 = \"JPEGDecompressor\",\n\n # prints internal info\n debug = False,\n )\n\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Roboflex util jpeg Library",
"version": "0.1.4",
"project_urls": {
"Homepage": "https://github.com/flexrobotics/roboflex_util_jpeg"
},
"split_keywords": [
"jpeg",
"robotics",
"middleware",
"flexbuffers",
"python",
"c++",
"c++20"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "169ee9dcf7e91e1597ce3c40e5c948f378acc6495f5d812f129c480eaa7cd1c6",
"md5": "8c750b510f4f9e0af5778b8872b16296",
"sha256": "aa896194f0b4c83d4871f89d8afb88a9e60ee2e66b76b7d98c2b398d49b51808"
},
"downloads": -1,
"filename": "roboflex.util.jpeg-0.1.4.tar.gz",
"has_sig": false,
"md5_digest": "8c750b510f4f9e0af5778b8872b16296",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 8273,
"upload_time": "2023-11-04T20:42:23",
"upload_time_iso_8601": "2023-11-04T20:42:23.186235Z",
"url": "https://files.pythonhosted.org/packages/16/9e/e9dcf7e91e1597ce3c40e5c948f378acc6495f5d812f129c480eaa7cd1c6/roboflex.util.jpeg-0.1.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-11-04 20:42:23",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "flexrobotics",
"github_project": "roboflex_util_jpeg",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "roboflex.util.jpeg"
}