Convert RGB/RGBA image files to pandas dataframes, and vice versa
Project description
What can you do with Pd2img?
This package allows you to open image files and convert them to a pandas Dataframe After you are done with your work, you can save the dataframe as an Image
how to use it
Everything you need to know
from pd2img import Pd2Img
df = Pd2Img(r"C:\Users\Gamer\Documents\Downloads\WhatsApp Image 2022-04-21 at 5.07.14 PM.jpeg") # creating an instance
df.to_file_rgb('f:\\testimagefile1.png') # save the dataframe to an RGB image
df.to_file_rgba('f:\\testimagefile2.png') # save the dataframe to an RGBA image
np3 = df.to_numpy_rgb() # convert the image to an numpy array (RGB, not BGR!)
np4 = df.to_numpy_rgba() # convert the image to an numpy array (RGBA)
print(df.df) # printing the dataframe
y x red green blue
0 0 0 155 150 144
1 0 1 155 150 144
2 0 2 153 148 142
3 0 3 152 147 141
4 0 4 151 147 138
... ... ... ... ...
1224955 956 1275 189 190 185
1224956 956 1276 189 190 185
1224957 956 1277 189 190 185
1224958 956 1278 189 190 185
1224959 956 1279 189 190 185
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
pd2img-0.0.3.tar.gz
(3.3 kB
view details)
Built Distribution
File details
Details for the file pd2img-0.0.3.tar.gz
.
File metadata
- Download URL: pd2img-0.0.3.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 25e903d7d292704266a3647fcec2b752ca8ed998d6372300c0125cde29156bbc |
|
MD5 | 453ae44a6587d8d95611010ef586b859 |
|
BLAKE2b-256 | 896ed7eab85b38963b86bd7361c0e33f591bd657a3d0e3cb399cf4b8ca980639 |
File details
Details for the file pd2img-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: pd2img-0.0.3-py3-none-any.whl
- Upload date:
- Size: 3.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e09a8603b9bab8b00acca33ee638109b13fdf9c894a47e1d737e5f34b21e4ca |
|
MD5 | 6e767d28ef9f934c9566d9eb91cdc2af |
|
BLAKE2b-256 | 6a61dd0ae19faff6e817de0e0a6ac7ac634566a631ef984289325499f4de7b18 |