A console tool to convert multiple PNG and BMP files into animated GIFs.
Modular Structure: This repository uses a modular architecture with a shared core library. See README-STRUCTURE.md for details on the organization.
- Drag & Drop: Simply drag PNG and BMP files onto the batch file
- Transparency Handling: Automatically handles transparent backgrounds
- Magic Pink Replacement: Replaces magic pink (#FF00FF) with custom background color
- Customizable: Adjustable FPS, background color, and other options
- Standalone: No dependencies on the main sprite browser application
- Install Python (if not already installed)
- Install dependencies:
pip install -r requirements.txt
- Drag PNG and BMP files onto
console/create_gif.bat - GIF will be created in the same folder as your first image file
- Drag multiple PNG and BMP files onto
console/create_gif.bat - The GIF will be created automatically with default settings
python console/giffer.py file1.png file2.bmp file3.pngpython console/giffer.py file1.png file2.bmp file3.png -o output.gif -f 10 --background "#ffffff"-o, --output: Output GIF file path (default: auto-generated)-f, --fps: Frames per second (default: 7.0)--no-transparency: Disable transparency handling--no-magic-pink: Disable magic pink replacement-b, --background: Background color for transparency (default: #f8f9fa)-d, --disposal: Frame disposal method (0-3, default: 2)
The disposal method controls how the canvas is refreshed between frames, preventing tearing artifacts:
- 0 (No Disposal): Next frame draws over current frame (may cause artifacts)
- 1 (Restore to Background): Clears frame area to background color
- 2 (Restore to Previous): Restores canvas to state before current frame (recommended)
- 3 (Restore to Previous Alt): Alternative implementation of method 2
Default (2) works best for most animations and prevents tearing artifacts.
python giffer.py sprite1.png sprite2.bmp sprite3.pngpython giffer.py *.png -f 12 -b "#000000"python giffer.py *.png --no-transparencypython giffer.py *.png -d 2The tool processes images in the following way:
- Transparency: Converts RGBA/LA images to RGB with background color
- Magic Pink: Replaces magic pink (#FF00FF) and pink-purple (#F800F8) pixels
- Color Optimization: Converts to palette mode for optimal GIF size
- Frame Timing: Uses specified FPS for smooth animation
- Frame Disposal: Controls how frames are cleared between animations (prevents tearing artifacts)
- Python 3.6+
- Pillow (PIL) library
- Clone or download this repository
- Install Python dependencies:
pip install -r requirements.txt
- Ready to use!
- Install Python from python.org
- Make sure Python is added to your system PATH
- Run:
pip install Pillow
- Make sure you're dragging actual PNG or BMP files
- Check that file extensions are
.pngor.bmp(case-insensitive)
- Try reducing the number of frames
- Use
--no-transparencyto disable transparency processing - Consider resizing your PNG or BMP files before processing
This tool currently supports PNG and BMP files, with plans to expand support for additional image formats commonly used in game development and pixel art:
- GIF - Static GIF frames (common for sprite animations)
- TGA - Gaming industry standard with strong alpha channel support
- WebP - Modern web format with efficient compression
- ICO - Windows icon format for game icons
- JPEG - General purpose format (with quality considerations for pixel art)
- TIFF - Professional format for high-quality exports
These planned formats align with Aseprite's export capabilities, making the tool more useful for pixel artists and game developers who use Aseprite for sprite creation.
Note: Vector formats (SVG) and proprietary formats (.ase, .aseprite) are not planned for support as they don't align with the tool's raster image focus.
This tool is extracted from the nm-sprite-browser project and follows the same license terms.