Skip to content

TheRainbowPhoenix/PyxiParser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Discord Server Download Downloads

This repository includes a Python implementation of the PixiParser and several utility scripts for checking, generating and inspecting .pixi files.

Installation

You will need Python 3.9+ (due to skia-python compatibility).

Install dependencies:

pip install skia-python pillow msgpack

Features

PixiParser (Python)

The core parser logic is in pixi_parser.py. It supports full serialization and deserialization of .pixi files (v5+), including preserving binary types (float32/int32) required for exact binary compatibility.

from pixi_parser import PixiParser

# Deserialize
doc = PixiParser.deserialize("my_file.pixi")

# Modify
doc.width = 100

# Serialize
PixiParser.serialize(doc, "modified.pixi")

Spritesheet Generator

generate_spritesheet.py is a powerful tool to convert a standard grid-based spritesheet (PNG) into a fully animated .pixi file with keyframes.

Usage:

  1. Place your spritesheet PNG in the test/ folder (or modify the script).
  2. Run the script:
    python generate_spritesheet.py
  3. It will automatically:
    • Detect grid size and frame count.
    • Encode frames using QOI compression (efficient storage).
    • Generate a valid .pixi structure with AnimationData, Layers, KeyFrames, and Timeline Grouping.

File Inspector

inspect_pixi.py provides a detailed, human-readable dump of any .pixi file structure.

Usage:

python inspect_pixi.py path/to/file.pixi

It displays header info, animation settings, node hierarchy, properties, and keyframe details.

ImHex Pattern

pixi.hexpat is a ImHex pattern file. Load this in ImHex to inspect the binary structure of .pixi files. It includes full MessagePack parsing definitions (msgpack.hexpat) to visualize the internal object structure.

Development Scripts

  • test_parser.py: Unit tests for the parser.
  • generate_f1.py: Test script for single-frame generation and binary structure verification.

About

Python port of PixiParser

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages