Skip to main content

sprite sheet utility

Project description

Sprite Sheet

This project develops a uitility box which uses to generate a sprite sheet

Documentaion

The project contains six different parts, include:

Waypoint 1: Find the Most Common Color in an Image

  • This function is a tool developed to find the most common color which can be considered as the background color.

Waypoint 2: Write a Class Sprite

  • This class is developed to generate a sprite instance which contains the sprite's parameter itself.

Waypoint 3: Find Sprites in an Image

  • This function is developed to generate a label map and sort out each sprite in the input image.

Waypoint 4: Draw Sprite Label Bounding Boxes

  • This function is developed to create a sprite sheet and its bounding box from a label map and a list of sprite object in the label map itself.

Waypoint 5: Write a Class SpriteSheet

  • This class is a automatic machine which have two build-in functions to create a sprite sheet image or a label map and a list of sprite object directly from the instanitiated image.

Waypoint 6: Package and Distribute the Python Library

  • This is a pakaging process to create a downloadable and installable distribution of the library for users to easily download, install and use as a python buid-in library

Usage

  • This lib is comparable with [python3] only. if you don't have one, you can download the latest version here.
  • Get source code from git or a distribution of the library from PyPI, for example:
$ git clone https://github.com/intek-training-jsc/sprite-sheet-tcthai.git
  • Import and use the library as any other buid-in lib. Example:
>>> from spriteutil.spritesheet import SpriteSheet
>>> sprite_sheet = SpriteSheet('some_image.png')
>>> sprites, labels = sprite_sheet.find_sprites()
>>> image = sprite_sheet.create_sprite_labels_image()
>>> image.save('barbarian_bounding_boxes.png')

Contact

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

sprite-sheet-tcthai-1.0.1.tar.gz (2.1 kB view hashes)

Uploaded Source

Built Distribution

sprite_sheet_tcthai-1.0.1-py3-none-any.whl (3.0 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