Skip to main content

A small library for interacting with `.pyxel` files from PyxelEdit.

Project description

Pyxi

PyPI version Documentation Status

pyxi is a small library for interfacing with PyxelEdit .pyxel files in an object-oriented manner. Currently it allows for viewing all attributes of a .pyxel file, modifying values, and repacking the file into its original format for use within PyxelEdit.

Examples

Editing tile width and height on an image.

from pyxi import image

p = image.PyxelImage('test_8px.pyxel')  # assume the tiles are 8x8
p.name = 'test_16px'
p.canvas.tile_width = 16
p.canvas.tile_height = 16
p.save()  # the .pyxel file tiles are now 16x16 in a file called test_16px.pyxel

Loading a .pyxel file as a texture in arcade.

import arcade
from pyxi import image

p = image.PyxelImage('test_8px.pyxel')
texture = p.get_tile()  # returns a Pillow Image object
player = arcade.Sprite(scale=4)
player.texture = arcade.Texture(name='S8dhS7dja', image=texture)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyxi-0.1.3.tar.gz (5.6 kB view hashes)

Uploaded Source

Built Distribution

pyxi-0.1.3-py3-none-any.whl (8.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page