Convert images (PNG, JPEG, BMP, GIF, TIFF, WebP) into static SWF icon sprite files for Skyrim mod menus. Produces minimal, clean SWFs with ExportAssets that can be loaded via AttachMovie by Dynamic Inventory Icon Injector (DIII), Status Indicator Framework (SIF), or similar frameworks. Output is static icons only — no animation or ActionScript.
- Static icon sprites only — no animation, no ActionScript, just crisp bitmap icons
- Minimal SWF output — no bloat, just
DefineBitsLossless2,DefineShape2,DefineSprite, andExportAssets - Multi-format input — PNG, JPEG, BMP, GIF, TIFF, WebP, and any format Pillow supports
- Alpha transparency preserved — PNG, WebP, and GIF with alpha channels produce clean transparent icons; JPEG/BMP will have a white background
- Per-image color tinting — assign a tint color to each icon; white (#ffffff) means no tint
- Name overrides — rename export labels per image without renaming the source files
- 7 registration points — top-left, top-center, top-right, center, bottom-left, bottom-center, bottom-right
- Auto-resize — scale longest side to target pixels, keep aspect ratio
- Batch processing — feed it a folder of images, get one SWF
- CLI + GUI + .exe — command-line for scripting, tkinter GUI for point-and-click, standalone .exe for distribution
- File reordering — drag-free ↑↓ buttons to arrange icon order before building
- JSON config save/load — save and restore file lists, settings, names, and tint colors
- SWF inspector — load existing SWFs to view icons, dimensions, and export individual images as PNG
- Zero extra dependencies — only
Pillowbeyond Python stdlib
None. Download and run.
- Python 3.x
Pillow—pip install Pillow
Download SWFSmelter.exe from GitHub Releases. No Python needed.
pip install PillowNo build step, no compiler.
# Basic: one icon
python SWFSmelter.py icon_smelt.png -o icons.swf
# Multiple icons
python SWFSmelter.py icon_smelt.png icon_temper.png icon_enchant.png -o icons.swf
# Resize to 128px, center registration
python SWFSmelter.py *.png -o icons.swf -r 128 --origin center
# Custom stage size and FPS
python SWFSmelter.py icon.png -o icons.swf -s 128 --fps 60| Flag | Description | Default |
|---|---|---|
inputs |
One or more PNG files | (required) |
-o, --output |
Output SWF path | icons.swf in first input's directory |
-r, --resize |
Scale longest side to N px | 64 |
-s, --stage |
Stage size in pixels | 64 |
--fps |
Frame rate | 30 |
--origin |
Registration point | top-left |
| Origin | Use Case |
|---|---|
top-left |
DIII (Dynamic Inventory Icon Injector) |
center |
SIF (Status Indicator Framework) |
| Others | Custom layouts, menus, overlays |
python SWFSmelterGui.pyTkinter GUI with two tabs:
- Top bar — Load Config, Save Config, and + Add Images buttons
- File list — thumbnails, filenames, per-image name override field, color tint picker, ✕ remove and ↑↓ reorder buttons
- Output — output path with Browse button
- Settings cards — two side-by-side panels:
- Image Settings — Max Icon Size, Stage Size (px), Origin dropdown
- Build SWF — large orange Build button
- Log area — build output with per-icon dimensions, tint info, and file size
- Load any SWF file to see its embedded icons
- Shows stage size, FPS, icon names, dimensions, and character IDs
- Export individual icons as PNG
- Supports both
ExportAssetssprite SWFs (SWFSmelter output) and frame-based animation SWFs (e.g. BOOBIES)
Inspector limitations:
- ExportAssets SWFs — full support: displays and exports actual icon images
- Frame-based SWFs — lists icon names and dimensions, but displays gray placeholder images since these use vector shapes rather than bitmaps. Exporting produces the placeholder, not the original artwork. A full SWF renderer would be needed to rasterize vector shapes.
Each PNG becomes three SWF tags:
- DefineBitsLossless2 (tag 36) — RGBA bitmap, zlib-compressed
- DefineShape2 (tag 22) — clipped bitmap fill with configurable registration
- DefineSprite (tag 39) — places the shape, exportable by name
Export label = PNG filename without extension (e.g. icon_smelt.png → icon_smelt).
FWS header (uncompressed, SWF8)
├── FileAttributes
├── SetBackgroundColor (white)
├── [per icon:]
│ ├── DefineBitsLossless2 (character ID N)
│ ├── DefineShape2 (character ID N+1)
│ ├── DefineSprite (character ID N+2)
│ └── ExportAssets (label = filename stem)
├── ShowFrame
└── End
Output SWFs have been tested and confirmed working with:
- Dynamic Inventory Icon Injector (DIII) — uses
top-leftregistration - Status Indicator Framework (SIF) — uses
centerregistration
Other frameworks that use AttachMovie with SWF ExportAssets should work but are untested.
{
"icon": "smithyInfoIcons.swf",
"label": "icon_smelt",
"condition": "smithySmelt"
}; AttachMovie call using the SWF and export label
menu.AttachMovie("icons.swf", "icon_smelt", depth)No compilation needed. Just run the Python scripts.
For distribution as a single .exe that runs without Python installed:
pip install pyinstaller
pyinstaller --onefile --noconsole --icon=SWFSmelterIcon.ico --add-data "SWFSmelterIcon.png;." --name=SWFSmelter SWFSmelterGui.pyOutput: dist/SWFSmelter.exe (~30 MB, includes Python + Pillow + tkinter).
The --add-data flag bundles the window icon PNG so it appears at runtime without needing external files.
To rebuild the .ico from the PNG source:
from PIL import Image
img = Image.open("SWFSmelterIcon.png")
img.save("SWFSmelterIcon.ico", sizes=[(256,256),(128,128),(64,64),(48,48),(32,32),(16,16)])MIT
- SWF format specification — Adobe/Macromedia
- Original SIF builder inspiration — SkyUI ItemFactory community
- SWF bug fixes — byte-by-byte comparison against working reference