img2fdf
is a Python program that converts an image into a .fdf map file, which you can run in the FilDeFer 42 campus project. Each pixel of the image is represented as a point in the map, with its corresponding color assigned in hexadecimal format. The resulting .fdf map can be used in various applications that require color mapping.
- Install the necessary requirements (see the Requirements section).
- Run the
img2fdf.py
script, providing the path to the image as input. - The program will generate the corresponding .fdf map file in the
output
folder.
python3 img2fdf.py
- Python 3.6 or above
- PIL (Python Imaging Library) package
Run this command on the project folder to install all the requirements:
pip3 install -r requirements.txt