Skip to main content

A sprite image splitter for rgba format image.

Project description

SpriteSplitter

Description

A sprite image splitter for rgba format image.

Install with

pip install sprite-splitter

More detail please see pypi.

Usage

from tools.sprite_splitter import AlphaSpriteSplitter, SplitterAlgorithm

img_path = "test/assets/multiple_test0.png"
splitter = AlphaSpriteSplitter(img_path)
box_border_color = (255, 0, 0, 255)
# default is SplitterAlgorithm.SPRITE_SCAN
splitter.show_split_result(box_border_color, SplitterAlgorithm.EDGE_DETECT)

Please refer to here

Performance

Platform: Python 3.12.7 CPU: Mac M3 Max

EDGE DETECT

image split time
assets/multiple_test0.png(104 x 113) 0.25486283301142976 seconds
assets/multiple_test1.png(2048 x 2048) 2.9249990829848684 seconds
assets/multiple_test2.png(1024 x 512) 1.142435582994949 seconds
assets/tmp.png(1024 x 1024) 2.3546547499718145 seconds

SPRITE SCAN

image split time
assets/multiple_test0.png(104 x 113) 0.19917637499747798 seconds
assets/multiple_test1.png(2048 x 2048) 0.8949957919539884 seconds
assets/multiple_test2.png(1024 x 512) 0.3498120000003837 seconds
assets/tmp.png(1024 x 1024) 0.6984633749816567 seconds

Execution Result

See here

Disclaimer

All downloads and use of the software (SpriteSplitter) are considered to have been carefully read and fully agreed to the following terms:

The software (SpriteSplitter) is provided solely for personal learning and communication purposes. It is strictly prohibited to use it for commercial or malicious purposes.

If any commercial use or malicious behavior is discovered, the author of the software (SpriteSplitter) reserves the right to revoke the usage rights.

All risks associated with the use of this software shall be borne solely by the user. The author of the software (SpriteSplitter) shall not be held responsible for any consequences.

Except for the service terms specified in the software (SpriteSplitter), the author shall not be liable for any accidents, negligence, contract breaches, defamation, copyright or other intellectual property infringements, or any losses caused by improper use of the software.

The author of the software (SpriteSplitter) shall not be responsible for any service interruptions or defects caused by force majeure, hacker attacks, communication line interruptions, or other uncontrollable factors that prevent normal use. However, the author will make every effort to minimize the losses or impacts caused to users.

Any issues not covered in this disclaimer shall be governed by the relevant national laws and regulations. In the event of any conflict between this disclaimer and national laws and regulations, the latter shall prevail.

The copyright of this disclaimer, as well as the rights to modify, update, and ultimately interpret it, belong solely to the author of the software (SpriteSplitter).

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_splitter-0.0.3.tar.gz (9.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sprite_splitter-0.0.3-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file sprite_splitter-0.0.3.tar.gz.

File metadata

  • Download URL: sprite_splitter-0.0.3.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for sprite_splitter-0.0.3.tar.gz
Algorithm Hash digest
SHA256 bc20da987459d10eff995995bfde7835681c920a67b9f692db82d6ab1eb7b0da
MD5 8fccff27433ce6c9480e8593ba8f2259
BLAKE2b-256 caef9379e4e9d97f35387c37a0c19b12498aea5a548ca1e97432da208e032aa8

See more details on using hashes here.

File details

Details for the file sprite_splitter-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for sprite_splitter-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 411f1d937ed7dada6ccd1384ad9c699a3f03418a8d27ededc04206f18d03a8ba
MD5 2d02b4d112142aeea91b7111c655c431
BLAKE2b-256 895ee6f455070a68878c768114616fc16bc129f791c4259aefbad1a9e1c6b13f

See more details on using hashes here.

Supported by

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