Skip to main content

Library and command line tool to rescale MSX/ViennaSweeper skins

Project description

VSRS

A library and command line tool to rescale MSX/ViennaSweeper skins.

Skins are tilemaps for Minesweeper clones. The format was originally established by Curtis Bright for MSX - Vienna MineSweeper uses a generalized version of it to support arbitrary square sizes (and, of course, skins).

Requires Pillow.

Requires an image viewer for the -s flag (see below).

Usage

For detailed usage instructions, run the tool with -h:

$ vsrs -h
usage: vsrs.py [-h] [-s] [-b BACKGROUND] [-o OUTPUT] input output_size

Resize MSX/Vienna MineSweeper skins

positional arguments:
  input                 input file to be scaled or html color code formatted like #rrggbb. If a color code is passed, generate a template for that output size using this as a foreground color
  output_size           output square size, in pixels

options:
  -h, --help            show this help message and exit
  -s, --show            show the generated skin in a popup
  -b, --background BACKGROUND
                        background color for skin
  -o, --output OUTPUT   write output to file OUTPUT

Happy Sweeping!
$

Examples

Scale in.bmp to a 33px square size skin and show it in a popup:

$ vsrs in.bmp 33 -s

Scale in.bmp to a 33px square size skin and save it in out.bmp:

$ vsrs in.bmp 33 -o out.bmp

Make a template for a 33px square size skin, using #ff0000 for the elements and #0000ff for the background color, show the result in a popup, and also save it in out.bmp:

$ vsrs "#ff0000" 33 -o out.bmp -b "#0000ff"

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

vsrs-0.1.0.tar.gz (13.5 kB view details)

Uploaded Source

Built Distribution

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

vsrs-0.1.0-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file vsrs-0.1.0.tar.gz.

File metadata

  • Download URL: vsrs-0.1.0.tar.gz
  • Upload date:
  • Size: 13.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for vsrs-0.1.0.tar.gz
Algorithm Hash digest
SHA256 015f9f9db46676ec7ea0723bbd9b8645e310b9bb599c3225a50d7adfb6a13b08
MD5 c92d85e3be35aa00d91625c35d9f3297
BLAKE2b-256 65171c69784b3629e7251b2bd8116f315b8bf9d50cdd32c3de174fcf798be700

See more details on using hashes here.

File details

Details for the file vsrs-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: vsrs-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for vsrs-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9d7051b67dd7400b507c9ca7575f51482bfef0bf3365a8dcf8660cd061d5a6b6
MD5 64693cff2124ec45fa1ee39d1e6829c8
BLAKE2b-256 08b5ef11bd86c96c3b6689e6f3861188de8414fc13769b5a74bc377a66166753

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