A Python script to extract and export individual layers from .svga animation files.
- Python 3.6+
protobuflibrary for parsing.protofiles.Pillowlibrary for image processing.
-
Clone the repository:
git clone https://github.com/AlirezaF80/SVGA-Layer-Extractor.git cd SVGA-Layer-Extractor -
Install dependencies:
pip install -r requirements.txt
-
No need to compile the
svga.protofile, as theSVGA_pb2.pyfile is already included.
However, if you wish to update the.protofile, you will need theprotoccompiler:- Linux/Mac:
sudo apt install protobuf-compiler
- Windows: Download from the official site.
Then, run:
protoc --python_out=. svga.proto
- Linux/Mac:
-
Run the script to extract layers:
python parse_svga.py <input_file.svga>
Example:
python parse_svga.py example.svga
-
The extracted layers will be saved in a directory named
<input_file>_outputunder the same directory as the input file.
- SVGA-Format for the file format specification.