PixelMatrix Converter is a Python project that allows you to convert images to matrix files and vice versa. This tool is useful for handling image data in a matrix format and converting it back to visual images.
- Convert Images to Matrix: Converts images from supported formats (PNG, JPG, JPEG, BMP, TIFF) into matrix files containing pixel values.
- Convert Matrix to Images: Converts matrix files back into images using the pixel data.
-
Clone the Repository:
git clone https://github.com/nomadsdev/pixel-matrix-converter.git
-
Install Dependencies: Ensure you have Python installed. Install the required Python libraries using pip:
pip install pillow numpy
-
Convert Image to Matrix:
- Place the images you want to convert in the
bin/images
directory. - Run the script and choose option
1
to convert images to matrix format.
python main.py
- Place the images you want to convert in the
-
Convert Matrix to Image:
- Ensure that the matrix files are in the
bin/output
directory. - Run the script and choose option
2
to convert matrix files back to images.
python main.py
The restored images will be saved in the
bin/restored
directory. - Ensure that the matrix files are in the
bin/images/
- Directory to place images for conversion.bin/output/
- Directory where matrix files will be saved.bin/restored/
- Directory where restored images will be saved.
To convert an image to matrix format:
python main.py
Choose 1
and follow the instructions.
To convert a matrix file back to an image:
python main.py
Choose 2
, select the matrix file, and the image will be saved in the bin/restored
directory.
For support or inquiries, please contact: [email protected]
This project is licensed under the MIT License.