Skip to main content

A simple tool for extracting sprites from full frames. Useful for AI projects.

Project description

A simple tool for extracting sprites from full frames. Useful for AI projects. Made using Python 3, Kivy, pillow and numpy.



pip install spritex

After running this command spritex command should be accessible from terminal.

For development and git cloning

There is which will create a symbolic link from “bin/spritex” to “/usr/local/bin” folder. Which enables spritex command to be executed from terminal.


  • numpy==1.12.1
  • Kivy>=1.10.0
  • pillow>=2.1.0

You can install dependencies via pip:

pip install -r requirements.txt --upgrade

Arch Linux

You can install dependencies via pacman.

sudo pacman -S python-pillow python-kivy python-numpy


You can open image files through spritex path.png. If you use SDL2 backend you can drag and drop image files on to application window.

General functionality

  • Toggle grid: Shows pixel grid when zoomed in.
    • Zoom should be at least 8 screen pixels = 1 image pixel.
  • Select region: Allows you to select a rectangular region in image via mouse drag and drop.
    • After a region selected roughly, it is possible to fine tune by arrow keys.
  • Copy Region to Clipboard: Copies the selected region coordinates to clipboard in (y1,x1,y2,x2) format.

Keyboard shortcuts

  • Without any modifiers arrow keys will move selection around by 1 px.
  • With Ctrl modifier selection will grow on bottom and right side by 1 px.
  • With Alt modifier selection will grow on top and left side by 1 px.
  • With shift modifier all operations will do 5px.

Extract Operations

  • Sprite: will create an image from selection into same folder of source image.
    • Useful at creating training data for ANN classifiers.
  • Unique colors: will extract unique colors of the selection relative to rest of the image. Output will be (unique color count)x1 image and will be saved into same folder with source.
    • Useful at locating simple objects that represented by unique colors from screen frame.
  • Unique sprite: will extract an image that is same size of selection but unique colors only.
    • Useful at locating simple objects that represented by unique colors at unique positions from screen frame.
  • Transparent sprite: will extract an transparent image from multiple images of same folder. Mismatching pixels will be discarded and transparent.
    • Useful at extracting exact sprite. When background is animating but sprite is not moving.

Overlays Functionality

Dynamically updates the selection window with selected operation. Useful for previewing the output.






Project details

Download files

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

Files for spritex, version 0.1.3
Filename, size File type Python version Upload date Hashes
Filename, size spritex-0.1.3.tar.gz (9.4 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page