Unpacks a BYOND "DMI" file into (A)PNGs.
Improved version of https://github.com/liambaloh/DMI2PNG for command-line use and APNG support.
This software unpacks DMI files into individual images, one for each icon state and direction.
Animated sprites are compiled into an APNG (animated PNG). States with multiple directions will be placed into a folder named after the state.
If an icon state is duplicated (or missing), this script will append a number or use "(unnamed)", respectively.
Currently, it is not possible to turn PNGs back into their component DMI files.
You will need command-line access, an installation of php, and some libraries like php-gd.
Navigate to the directory containing this repository and run:
php index.php [path to DMI file or directory]
If a directory is given, it will recursively convert DMI files in that directory. If a single file is given, it will just convert that single file.
Example:
- test.dmi
- human (4 directions)
- robot (animated)
After running, it will write the following folders and files:
- test/
- human/
- human-dir1.png
- human-dir2.png
- etc.
- robot.png
- human/
The new folder will be in the same folder as the DMI was.
- Forked from https://github.com/liambaloh/DMI2PNG (GPL-3.0)
- Animated PNG Creator, version 1.6.2 (LGPL)
- PNGMetadataExtractor class, from MediaWiki
GPL-3.0. See "LICENSE" file for details.