Skip to main content

Package for drawing images of M@B Bannerlord banners from community created banner codes.

Project description

blib - Banner Library

Library for drawing images of community created banners in M&B Bannerlord game.

Get started

Download the source images in img/

$ git clone -b source-img https://github.com/Niklas-Seppala/blib; \
mv blib/img img/; \
rm -rf blib

Install blib

$ pip install blib

Example usage

from blib import blib_init, Banner, Files

blib_init(out='out/', src='img/')
code = '9.116.116.1327.1327.768.788.1.0.0.316.127.143.1080.3840.764.764.1.0.0.512.116.116.240.120.764.764.1.1.90.512.116.116.240.120.644.764.1.1.90.512.116.116.240.120.524.764.1.1.90.512.116.116.240.120.884.764.1.1.90.512.116.116.240.120.1004.764.1.1.90.512.116.116.240.120.764.609.1.1.90.512.116.116.240.120.884.609.1.1.90.512.116.116.240.120.524.609.1.1.90.512.116.116.240.120.644.609.1.1.90.512.116.116.240.120.1004.609.1.1.90.512.116.116.240.120.1004.454.1.1.90.512.116.116.240.120.884.454.1.1.90.512.116.116.240.120.764.454.1.1.90.512.116.116.240.120.644.454.1.1.90.512.116.116.240.120.524.454.1.1.90.512.116.116.240.120.524.919.1.1.90.512.116.116.240.120.644.919.1.1.90.512.116.116.240.120.764.919.1.1.90.512.116.116.240.120.884.919.1.1.90.512.116.116.240.120.1004.919.1.1.90.512.116.116.240.120.1004.1074.1.1.90.512.116.116.240.120.884.1074.1.1.90.512.116.116.240.120.764.1074.1.1.90.512.116.116.240.120.644.1074.1.1.90.512.116.116.240.120.524.1074.1.1.90.424.143.116.120.120.579.684.1.0.0.424.143.116.120.120.698.684.1.0.0.424.143.116.120.120.818.684.1.0.0.424.143.116.120.120.938.684.1.0.0.424.143.116.120.120.938.526.1.0.0.424.143.116.120.120.819.526.1.0.0.424.143.116.120.120.699.526.1.0.0.424.143.116.120.120.579.526.1.0.0.424.143.116.120.120.457.526.1.0.0.424.143.116.120.120.457.684.1.0.0.424.143.116.120.120.457.841.1.0.0.424.143.116.120.120.457.996.1.0.0.424.143.116.120.120.578.996.1.0.0.424.143.116.120.120.699.996.1.0.0.424.143.116.120.120.818.996.1.0.0.424.143.116.120.120.938.996.1.0.0.424.143.116.120.120.1059.996.1.0.0.424.143.116.120.120.1059.840.1.0.0.424.143.116.120.120.938.840.1.0.0.424.143.116.120.120.818.840.1.0.0.424.143.116.120.120.698.840.1.0.0.424.143.116.120.120.578.840.1.0.0.424.143.116.120.120.1059.681.1.0.0.424.143.116.120.120.1059.525.1.0.0.424.143.116.120.120.1059.375.1.0.0.424.143.116.120.120.939.375.1.0.0.424.143.116.120.120.820.375.1.0.0.424.143.116.120.120.699.375.1.0.0.424.143.116.120.120.578.375.1.0.0.424.143.116.120.120.455.375.1.0.0.424.143.116.120.120.455.375.1.0.0.424.143.116.120.120.579.1147.1.0.0.424.143.116.120.120.699.1147.1.0.0.424.143.116.120.120.819.1147.1.0.0.424.143.116.120.120.939.1147.1.0.0.512.127.127.60.60.1186.764.1.0.0.512.127.127.60.60.1226.764.1.0.0.512.127.127.60.60.1266.764.1.0.0.512.127.127.60.60.1306.764.1.0.0.512.127.127.60.60.1346.764.1.0.0.512.127.127.60.60.1386.764.1.0.0.512.127.127.60.60.1426.764.1.0.0.512.127.127.60.60.1466.764.1.0.0.512.127.127.60.60.1186.704.1.0.0.512.127.127.60.60.1226.704.1.0.0.512.127.127.60.60.1266.704.1.0.0.512.127.127.60.60.1306.704.1.0.0.512.127.127.60.60.1346.704.1.0.0.512.127.127.60.60.1386.704.1.0.0.512.127.127.60.60.1426.704.1.0.0.512.127.127.60.60.1466.704.1.0.0.512.127.127.60.60.342.764.1.1.0.512.127.127.60.60.302.764.1.0.0.512.127.127.60.60.262.764.1.0.0.512.127.127.60.60.222.764.1.0.0.512.127.127.60.60.182.764.1.0.0.512.127.127.60.60.142.764.1.0.0.512.127.127.60.60.102.764.1.0.0.512.127.127.60.60.62.764.1.0.0.512.127.127.60.60.62.704.1.0.0.512.127.127.60.60.102.704.1.0.0.512.127.127.60.60.142.704.1.0.0.512.127.127.60.60.182.704.1.0.0.512.127.127.60.60.222.704.1.0.0.512.127.127.60.60.262.704.1.0.0.512.127.127.60.60.302.704.1.0.0.512.127.127.60.60.342.704.1.0.0'
b = Banner(code).rescale(0.5).crop(650, 500).save(Files.Format.PNG)

alt

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

blib-0.0.3.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

blib-0.0.3-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: blib-0.0.3.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for blib-0.0.3.tar.gz
Algorithm Hash digest
SHA256 c02063f99a42220aaf4df91a5925298ac38645949464edc7a6e50432e8e7ec64
MD5 29b1cbbfcb4156c5ab67c72ff994b051
BLAKE2b-256 e7ba423b349b9d98e139d9fa623de5a361384805be6ff97d0368bddadff4bd38

See more details on using hashes here.

File details

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

File metadata

  • Download URL: blib-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 10.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for blib-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 8bf99d1e2161b41f5520bf300621f91de6b97c52cf7154db675ca3af026d87b5
MD5 fed5c133406be1c4433267d6ee34dd65
BLAKE2b-256 5786a180956a80f27429b59cb353f129f56d9ce6c8842cd483d47c432ae9b7f1

See more details on using hashes here.

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