Skip to main content

This is helper package for game called 'Colouring art'

Project description

Pickart

Українська версія

Pickart - this is the file format used by the game calledColouring art for storing images.

Name 'Pickart' - comes from combination of two words 'pickle' and 'art'.

About format

Root of .pickart file is Python dict serialized with pickle and compressed with gzip.

File structure(version 1.0.0):

{
    "info":{
        "size": (1, 1),
        "version": 1
    },
    "palette":[(red, green, blue, alpha), ...],
    "pixels": [
        [(colour_index, is_painted), ...]
    ]
}

"info" - stores image size and Pickart file version.

"palette" - stores colour palette. Every colour is tuple of integers. Integer value is in range from 0 to 255(including), alpha - optional.

"pixels" - stores matrix which contain tuple with colour_index(int) and flag painted(bool).

colour_index - colour index in palette if this pixel is transparent(alpha = 0) index becomes None.

painted - represents pixel state if false it will appear as a shade of gray otherwise like normal colour.

Package pickle has security issues game does not use standart pickle.load() instead it uses restricted loader which allows only basic types(int, str, list, dict, tuple, set). If it detects that file contains external types(any object that is imported) it will throw exception UnpicklingError with message There is something strange in the file, do not trust it!.

Command line interface

This package allows convert .png files to .pickart and vise versa.

Command below shows all arguments:

Windows:

python -m pickart -h

For Linux and MacOS

python3 -m pickart -h

Basic arguments

-i "path" - indicates the folder in which the files for conversion are located(by default 'input'). Folder must exist.

-o "path" - indicates the folder in which converted files will be stored(by default 'output'). May not exist.

-m "mode" - indicates conversion mode:

  • to_pickart - .png files to .pickart files.
  • to_png - .pickart files to .png files.

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

Pickart-1.0.0.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

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

Pickart-1.0.0-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

Details for the file Pickart-1.0.0.tar.gz.

File metadata

  • Download URL: Pickart-1.0.0.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.7

File hashes

Hashes for Pickart-1.0.0.tar.gz
Algorithm Hash digest
SHA256 becbf42d72f9b8a536e92d35564676fd366c883e10b5258549c9c30385afd2a5
MD5 983ca3a912619e1951d56dc57818eb66
BLAKE2b-256 50bb57bc59b88680b8ff8ba77a19e4df8a0889f3b24b0be06f137d144217817d

See more details on using hashes here.

File details

Details for the file Pickart-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: Pickart-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 12.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.7

File hashes

Hashes for Pickart-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e0fe5f6c5baffd79afde2fbf0a586bce5aa8429ab37ad4b5ec9e505aa6f3724e
MD5 822852db5eec5bce027b9c4231a51ee0
BLAKE2b-256 4edecc5981d833b7eb90653a15531ece3e1c3094929406c2dbff711c0a2f187f

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