Skip to content

About

A Python tool that encodes any file by converting its binary data into an image and decodes it back to the original file.

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

EncodeAnythingToImage

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.

Features

  • Encode any file into an image.
  • Decode the image back into the original file.
  • Simple and easy-to-use command-line interface.

How It Works

Encoding

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.

Decoding

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.

Usage

Encoding a File

To encode a file into an image, run the following command:

python3 src/encoder.py /path/to/sourceFile /path/to/encodedImage.png

Decoding a File

To 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.mp3

Example

Here is an example of how to use the scripts. We will encode this gif:

spiderman-pizza-time

  1. Encode an GIF file into an image:
python3 src/decoder.py spiderman-pizza-time.gif EncodedImage.png

The Resulted Image:

EncodedImage

  1. Decode the image into the actual file:
python3 src/decoder.py EncodedImage.png MysteriousFile

The Resulted File:

MysteriousFile

License

This project is licensed under the MIT License . See the LICENSE file for details.

Ali Berk Karaarslan

2024

About

A Python tool that encodes any file by converting its binary data into an image and decodes it back to the original file.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages