Imaginenc
Convert any file into an image, and images back to files.
Installation
Imaginenc is available on PyPI:
$ python -m pip install imaginenc
Imaginenc requires Python 3.8+.
Usage
usage: imaginenc [-h] (-e | -d) -i INPUT [-o OUTPUT] [-s SIGN]
Convert any file into an image, and images back to files. Run without args for interactive input mode.
optional arguments:
-h, --help show this help message and exit
-e, --encode encode file to image
-d, --decode decode image to file
-i INPUT, --input INPUT
input file
-o OUTPUT, --output OUTPUT
output folder
-s SIGN, --sign SIGN sign the encoded image (max 50 characters)
Examples of imaginenc command
Encode
imaginenc -e -i imaginenc\imaginenc.py -o images -s "Thank you for using this tool!"
Decode
imaginenc -d -i images\imaginenc.py.png -o output
Examples of imaginenc module
Import
import imaginenc
Encode file name and save as image
imaginenc.encode_file_name(
input_file_path='imaginenc/imaginenc.py',
output_file_path='images',
sign='signature'
)
Encode file bytes and return image
with open('imaginenc/imaginenc.py') as f:
image = imaginenc.encode_bytes_to_image(
input_file_bytes=f.read(),
file_name=f.name(),
sign='signature'
)
Decode image name and save as original file
metadata = imaginenc.decode_image_name(
input_file_path='images/imaginenc.py.png',
output_file_path='output'
)
Decode PIL image to original file bytes
from PIL import Image
image = Image.open('images/imaginenc.py.png')
file_bytes, metadata = imaginenc.decode_image_to_bytes(
image=image
)
Planned Features
- Encryption.
Metadata
Release files for imaginenc 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| imaginenc-1.0.1.tar.gz | 6.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| imaginenc-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.9 kB
Release files / imaginenc-1.0.1.tar.gz
| Download URL | imaginenc-1.0.1.tar.gz |
|---|---|
| Size | 6.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
af86174773b73a3e43cf7a6184a96ca41798ad2e4e33012e5a730aa4d220b4e1
|
|
BLAKE2b-256 checksum How to use checksums |
3dd274a8af96c70e1bec33f1beaf4df0fdfa1049009f8319c80396d23d2e2d28
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.11
|
Release files / imaginenc-1.0.1-py3-none-any.whl
| Download URL | imaginenc-1.0.1-py3-none-any.whl |
|---|---|
| Size | 7.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3eba69a241d107020062064c11a709c3b7d04493d6be7b4a2b82b5fbe7a9c727
|
|
BLAKE2b-256 checksum How to use checksums |
74c3547e2108864b9e7f9deca822153e08693ee56ee019e211bad6753ccf26cd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.11
|
Security for imaginenc 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.