Name | numpyimage JSON |
Version |
3.1.1
JSON |
| download |
home_page | None |
Summary | Load, save, & manipulate image files as numpy arrays |
upload_time | 2025-08-01 16:20:40 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.6 |
license | MIT License
Copyright (c) 2025 Jasper Phelps
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
|
keywords |
images
pixel arrays
image formats
convert
graphics
draw simple shapes
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# npimage
Need to load pixel values from image files as numpy arrays, and hate having to remember whether you should use PIL, tifffile, matplotlib, or something else? Hate having to deal with the fact that those libraries all use different function names and syntaxes? Wish you could just provide a filename and get back a numpy array? This library's `imageio.py` does that, with `array = npimage.load(filename)`, `npimage.save(array, filename)`, and `npimage.show(array)` functions that let you easily handle a number of common image file formats without having to remember library-specific syntax. Additionally, `vidio.py` provides `array = npimage.load_video(filename)` and `npimage.save_video(array, filename)` for videos as well. (Another similar library to consider using is [imageio](https://pypi.org/project/imageio/).)
Want to draw simple shapes like lines, triangles, and circles into 3D numpy arrays? Frustrated that the python libraries you can find online like `opencv` and `skimage.draw` work on 2D arrays but not 3D? I wrote some functions in `graphics.py` that do the trick in 3D. (If you know of another library that can do this, please let me know!)
### Documentation
- `imageio.py`: load, save, or show images.
- `vidio.py`: load or save videos.
- `graphics.py`: draw points, lines, triangles, circles, or spheres into 2D or 3D numpy arrays representing image volumes.
- `nrrd_utils.py`: compress or read metadata from `.nrrd` files.
- `operations.py`: perform operations on images.
Check each function's docstring for more details.
### Installation
As is always the case in python, consider making a virtual environment (using your preference of conda, virtualenv, or virtualenvwrapper) before installing.
**Option 1:** `pip install` from PyPI:
pip install numpyimage
(Unfortunately the name `npimage` was already taken on PyPI, so `pip install npimage` will get you a different package.)
**Option 2:** `pip install` directly from GitHub:
pip install git+https://github.com/jasper-tms/npimage.git
**Option 3:** First `git clone` this repo and then `pip install` it from your clone:
cd ~/repos # Or wherever on your computer you want to download this code to
git clone https://github.com/jasper-tms/npimage.git
cd npimage
pip install .
**After installing,** you can import this package in python using `import npimage` (not `import numpyimage`!)
Raw data
{
"_id": null,
"home_page": null,
"name": "numpyimage",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": "images, pixel arrays, image formats, convert, graphics, draw simple shapes",
"author": null,
"author_email": "Jasper Phelps <jasper.s.phelps@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/5d/64/8cda38c21cc00c079315e339c41251d7daccd3edd100ea2a0b6359922a0b/numpyimage-3.1.1.tar.gz",
"platform": null,
"description": "# npimage\nNeed to load pixel values from image files as numpy arrays, and hate having to remember whether you should use PIL, tifffile, matplotlib, or something else? Hate having to deal with the fact that those libraries all use different function names and syntaxes? Wish you could just provide a filename and get back a numpy array? This library's `imageio.py` does that, with `array = npimage.load(filename)`, `npimage.save(array, filename)`, and `npimage.show(array)` functions that let you easily handle a number of common image file formats without having to remember library-specific syntax. Additionally, `vidio.py` provides `array = npimage.load_video(filename)` and `npimage.save_video(array, filename)` for videos as well. (Another similar library to consider using is [imageio](https://pypi.org/project/imageio/).)\n\nWant to draw simple shapes like lines, triangles, and circles into 3D numpy arrays? Frustrated that the python libraries you can find online like `opencv` and `skimage.draw` work on 2D arrays but not 3D? I wrote some functions in `graphics.py` that do the trick in 3D. (If you know of another library that can do this, please let me know!)\n\n\n### Documentation\n- `imageio.py`: load, save, or show images.\n- `vidio.py`: load or save videos.\n- `graphics.py`: draw points, lines, triangles, circles, or spheres into 2D or 3D numpy arrays representing image volumes.\n- `nrrd_utils.py`: compress or read metadata from `.nrrd` files.\n- `operations.py`: perform operations on images.\n\nCheck each function's docstring for more details.\n\n\n### Installation\n\nAs is always the case in python, consider making a virtual environment (using your preference of conda, virtualenv, or virtualenvwrapper) before installing.\n\n**Option 1:** `pip install` from PyPI:\n\n pip install numpyimage\n\n(Unfortunately the name `npimage` was already taken on PyPI, so `pip install npimage` will get you a different package.)\n\n**Option 2:** `pip install` directly from GitHub:\n \n pip install git+https://github.com/jasper-tms/npimage.git\n\n**Option 3:** First `git clone` this repo and then `pip install` it from your clone:\n\n cd ~/repos # Or wherever on your computer you want to download this code to\n git clone https://github.com/jasper-tms/npimage.git\n cd npimage\n pip install .\n\n**After installing,** you can import this package in python using `import npimage` (not `import numpyimage`!)\n",
"bugtrack_url": null,
"license": "MIT License\n \n Copyright (c) 2025 Jasper Phelps\n \n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n \n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n ",
"summary": "Load, save, & manipulate image files as numpy arrays",
"version": "3.1.1",
"project_urls": {
"Repository": "https://github.com/jasper-tms/npimage"
},
"split_keywords": [
"images",
" pixel arrays",
" image formats",
" convert",
" graphics",
" draw simple shapes"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "99da560910bdd1dcbc5f481f7a5bacfd153f105d35d66d38a088d06e2e259d6f",
"md5": "0ea74df4e13048ad5800ffc1975753ac",
"sha256": "1bd687f4f3595f48d67b1e86a7bcd205d00dd2a90ffd12ab053c65ba7aa7ce9f"
},
"downloads": -1,
"filename": "numpyimage-3.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "0ea74df4e13048ad5800ffc1975753ac",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 40289,
"upload_time": "2025-08-01T16:20:39",
"upload_time_iso_8601": "2025-08-01T16:20:39.217839Z",
"url": "https://files.pythonhosted.org/packages/99/da/560910bdd1dcbc5f481f7a5bacfd153f105d35d66d38a088d06e2e259d6f/numpyimage-3.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "5d648cda38c21cc00c079315e339c41251d7daccd3edd100ea2a0b6359922a0b",
"md5": "d4e371d61f5eb2784af9d19134d0e1fe",
"sha256": "763b0a6a1c639a0ad758c89a23f3cb59268a072e36026662b5876a7c29df20e7"
},
"downloads": -1,
"filename": "numpyimage-3.1.1.tar.gz",
"has_sig": false,
"md5_digest": "d4e371d61f5eb2784af9d19134d0e1fe",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 41507,
"upload_time": "2025-08-01T16:20:40",
"upload_time_iso_8601": "2025-08-01T16:20:40.034964Z",
"url": "https://files.pythonhosted.org/packages/5d/64/8cda38c21cc00c079315e339c41251d7daccd3edd100ea2a0b6359922a0b/numpyimage-3.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-01 16:20:40",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "jasper-tms",
"github_project": "npimage",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "numpyimage"
}