This script converts all WebP images in the current directory to GIF format using the Python Imaging Library (PIL).
- Python 3.x
- Pillow package
- colorama package
- Clone the repository:
git clone https://github.com/Wffv9FNa/WebP-to-GIF-Converter
- Install Pillow package:
pip install pillow
- Install colorama package:
pip install colorama
- Navigate to the directory containing WebP files you want to convert to GIF.
- Run the script:
python webp_to_gif.py
- The script will convert all WebP files in the directory to GIF and delete the original WebP files.
The script will output a message for each file that is converted, indicating the original file name in yellow and the new file name in cyan.
- The converted GIFs will be saved with a disposal mode of 2, which means that the background of each frame will be cleared to its original color.
- The script removes the background info from the WebP files, if present, before converting them to GIF.
- The converted GIFs will have the same name as the original WebP files but with the
.gif
extension.