File tree Expand file tree Collapse file tree
ImageProcessingScripts/Animated Image Generator Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Animated Image Generator
2+
3+ ## Aim
4+
5+ This is a simple script to concatenate frame images, generating animation.
6+
7+ ## Short description
8+
9+ - With all valid image files in ``` --target ``` directory, a single animated image will be generated and saved
10+ as ``` --output ``` .
11+ - Other valid options are:
12+ - ``` --speed ``` : How long a single frame will be shown in resulting animation(in milliseconds).
13+ - ``` --output_extension ``` : Instead of designating ``` output ``` option, one can simply set this to get
14+ results.{extension} file in original target directory.
15+
16+ ## Workflow
17+
18+ - This script reads all valid image files using ``` glob ``` module.
19+ - Valid image files are files with ``` IMG_EXTENSIONS ```
20+ - Alpha channel will not be used, since it seems gif extension does not support it.
21+ - Then, they are concatenated by ``` Pillow.Image ``` module.
22+
23+ ## Setup instructions
24+
25+ - The only thing to setup is to install Pillow.
26+
27+ ```
28+ pip install -r requirements.txt
29+ ```
30+
31+ ## Output
32+
33+ - Script
34+ ```
35+ $ python animated_image_generator.py --target "./images" --output_extension "gif" --speed 25
36+ ```
37+ - Result
38+ ![ output_gif] ( images/result.gif )
39+
You can’t perform that action at this time.
0 commit comments