first import the package on your terminal with pip:
pip3 install im2txt
next you import the module:
import im2txt
now you just need to encode the image of your preference:
im2txt.encode('/path/to/image/pooptest.jpg')
you will receive a pooptest.txt file.
This file will have the pixel value of all pixels on the image.
To decode the .txt file back to an image we use:
im2txt.decode('path/to/txtfile/pooptest.txt')
you will receive the encoded image back again in form of .png!
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
im2txt-0.0.3.tar.gz
(1.9 kB
view details)
File details
Details for the file im2txt-0.0.3.tar.gz.
File metadata
- Download URL: im2txt-0.0.3.tar.gz
- Upload date:
- Size: 1.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8bd79b1700502019473139a27222b4eae1ed75f21e4f7c34f8ec6b4a66ca54bb
|
|
| MD5 |
ba9d56acb1e0124327d3b0ace86f35bd
|
|
| BLAKE2b-256 |
4a41b586a5c1e19a17786fdb70837229dcd61516de2929cdcf101b46b7daeed7
|