EncodeAnythingToImage is a Python project that allows you to encode any file by converting its binary data into RGB values and storing it in an image. This repository contains two scripts: encoder.py and decoder.py. The encoder.py script encodes a file into an image, and the decoder.py script decodes the image back into the original file.
- Encode any file into an image.
- Decode the image back into the original file.
- Simple and easy-to-use command-line interface.
The encoder.py script reads the binary data of the input file, converts this data into RGB values, and writes these values to an image file.
The decoder.py script reads the RGB values from the encoded image and converts these values back into binary data to reconstruct the original file.
To encode a file into an image, run the following command:
python3 src/encoder.py /path/to/sourceFile /path/to/encodedImage.pngTo encode a encoded image into the original file, run the following command:
python3 src/decoder.py /path/to/encoded_song.png /path/to/decoded_song.mp3Here is an example of how to use the scripts. We will encode this gif:
- Encode an GIF file into an image:
python3 src/decoder.py spiderman-pizza-time.gif EncodedImage.pngThe Resulted Image:
- Decode the image into the actual file:
python3 src/decoder.py EncodedImage.png MysteriousFileThe Resulted File:
This project is licensed under the MIT License . See the LICENSE file for details.
Ali Berk Karaarslan
2024


