The library that translates the Pillow expression into a Numpy array and on the contrary. It also allows you to save images from the Numpy array.
Project description
ArrayPil
The library that translates the Pillow image into a Numpy array and on the contrary. It also allows you to save images from the Numpy array. The library is designed to facilitate and understand the code. I also apologize for my crooked English translation. Author's website: https://tatem.pythonanywhere.com/
Example of using the library:
importing ArrayPil
from ArrayPil import ArrayPil
importing numpy and pillow
from PIL import Image
import numpy as np
put the ArrayPil class in a variable
ArrayPil = ArrayPil()
we will get a array numpy the image that we took from our folder (your folder)
# the first parameter is the location of the image
# the second parameter is the default RGB color model
num_array = ArrayPil.ConvImgArray('image1.jpg')
print(num_array)
convert the a array numpy into a picture
# the first parameter is a array numpy
# the second parameter is the location where the image is saved
# the third parameter is the default RGB color model
ArrayPil.ImgSave(num_array, 'res.jpg')
convert the numpy array to a pillow image
# the first parameter is a array numpy
# the second parameter is the default RGB color model
pil_img = ArrayPil.ConvImgPil(num_array)
print(pil_img)
convert pillow images to numpy array
# the first parameter is the pillow image
# the second parameter is the default RGB color model
num_array2 = ArrayPil.ConvPilArray(pil_img)
print(num_array2)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ArrayPil-1.1.tar.gz
(2.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ArrayPil-1.1.tar.gz.
File metadata
- Download URL: ArrayPil-1.1.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
716671b8533d5f0fa78f207687877c0549bfb618d46ba247d405795e4efa106d
|
|
| MD5 |
8f656609adf47f38bbb5835e9373971c
|
|
| BLAKE2b-256 |
246734df283ebbc5396876347ec1b508e7275a09d874a252e1926d79b7d1ad3d
|
File details
Details for the file ArrayPil-1.1-py3-none-any.whl.
File metadata
- Download URL: ArrayPil-1.1-py3-none-any.whl
- Upload date:
- Size: 3.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1694a7919c196e48d6dc31d4602459b8f643b3a07e14296f258dd8339c54213b
|
|
| MD5 |
89bcdf3cc8bea341a5f4ad644aba6041
|
|
| BLAKE2b-256 |
f18d0ed5ac4078b8353d31c67e577e4a45a6556943d4cdd27aa6932bda034463
|