A simple python script for enlarging animated GIF (pixel art) and convert it into an APNG (by default with Nearest-Neighbor Interpolation).
Tested under Python 3.11.2 & Pillow 10.1.0
- Download the python script main.py
- Download the executable (built by PyInstaller) from Release
Args | Description |
---|---|
-d , --dimension |
Dimension of the output (square) apng (Default=512px, Min.=Source image size) |
-l , --limit |
Limit for the maximum magnification (Default=12, No limit=0) |
-n , --online |
Using online image with URL as source |
-i , --input |
Image input format (Default: gif ) |
-o , --output |
Image output format (Default: png ) |
-r , --resample |
Type of image interpolation (Default = NEAREST) |
-g , --download |
Download the online images only (without anying enlargement) |
Details: Pillow Documentation
-r Values |
Filter Name |
---|---|
0 |
NEAREST |
1 |
BOX |
2 |
BILINEAR |
3 |
HAMMING |
4 |
BICUBIC |
5 |
LANCZOS |
- By default, the output file format will be
.png
with resolution = 512 × 512 - The output file will placed into a subfolder 'enlarged'
- When using online image (with URLs) as source, you have to press
Ctrl + Z
(for Windows) /Ctrl + D
(for Linux) to new line to complete your insert