This Python script converts a series of PNG images into a GIF animation.
- Python 3.x
- Pillow library (
pip install pillow
)
You can install the package using pip:
pip install .
After installation, you can use the command line interface (CLI) to convert PNG images to GIF.
png2gif input_path output_filename --frame_rate 10
input_path
: Path to the directory containing PNG images.output_filename
: Name of the output GIF file.--frame_rate
: Frame rate of the output GIF (default: 10 FPS).
You can also execute the package directly without installation:
python -m png2gif input_path output_filename --frame_rate 10
If you prefer to use the package as a module in your Python code:
from png2gif import create_gif
input_path = "path/to/input_directory"
output_filename = "output.gif"
frame_rate = 10
create_gif(input_path, output_filename, frame_rate)
pytest
You can run the tests using pytest:
Contributions are welcome! Please feel free to submit pull requests or open issues for bug fixes, feature requests, or general improvements.
This project is licensed under the MIT License - see the LICENSE file for details.