GIF-Maker is a Flask-based RESTful API that allows users to create GIF animations from multiple images or a video. It provides a simple and efficient service for developers and enthusiasts who want to programmatically generate GIFs from their image collections.
- Create GIF animations from a series of images.
- Customize GIF duration, loop count, and image sequence.
- Lightweight and easy-to-use REST API.
- Python 3.6 or higher installed on your system.
- Install the required dependencies by running:
pip install -r requirements.txt
- Clone this repository to your local machine.
- Navigate to the project directory:
cd GIF-Maker
- Start the Flask development server:
python app.py
- The API will be accessible at
http://localhost:5000
.
Send a POST request to the /video
endpoint with the video to be used for the GIF animation.
Params:
{
"url":"data:video/webm;base64,GkXfowEAAAAAAAAfQoaB....,
"duration":"1"
}
Example using curl
:
curl -X POST -F "video=data:video/webm;base64,GkXfowEAAAAAAAAfQoaB...." -F "duration=1" http://localhost:5000/video
Send a POST request to the /images
endpoint with the images to be used for the GIF animation.
params:
{
"url":["data:image/png;base64,GkXfowEAAAAAAAAfQoaB....","data:image/png;base64,GkXfowEAAAAAAAAfQoaB...."],
"duration":"1"
}
The API will respond with a JSON object containing the URL of the generated GIF file.
Example Response:
{
"data": "data:image/gif;base64,R0lGODlhEA...."
}
You can customize the GIF output by passing additional parameters in the request. Supported parameters are:
duration
: The duration of the GIF in seconds.
Contributions are welcome! If you have any feature suggestions, bug reports, or code improvements, feel free to open an issue or submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.