Skip to main content

A simple python lib to create poster image with define data.

Project description

oneimage

A simple python lib to create poster image with define data.

Install oneimage

 pip install oneimage

Usage

data = {
    'width': 300,
    'height': 300,
    'background': 'white',
    'elements': [
        {'type': 'image', 'url': 'http://www.inruan.com/static/img/logo.png', 'left': 0, 'top': 0, 'width': 100, 'height': 100},
        {'type': 'image', 'url': 'http://www.inruan.com/static/img/logo.png', 'left': 200, 'top': 200, 'width': 100, 'height': 100},
        {'type': 'text', 'text': 'Hello', 'font': 'https://cdn-qn.huaeb.com/ifarm/20200305/WeiRuanYaHei-1.ttf', 'left': 0, 'top': 100, 'width': 300, 'size': 20, 'height': 100, 'align': 'center', 'vertical': 'center', 'color': 'black'}
    ]
}
from oneimage import create_image
img = create_image(data=data)
img.show()

The result:

t2

Click to view more information!

CHANGES

1.0.0

  • first version

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

oneimage-1.1.2.tar.gz (4.1 kB view details)

Uploaded Source

File details

Details for the file oneimage-1.1.2.tar.gz.

File metadata

  • Download URL: oneimage-1.1.2.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/2.7.16

File hashes

Hashes for oneimage-1.1.2.tar.gz
Algorithm Hash digest
SHA256 654d8cd2c993a6ec099c0f763de7292b613b67c2147c8157e1940d71f6f33584
MD5 a4555d3f17596a4f1e4b666f8dd1cde2
BLAKE2b-256 e3434b572aa2661df694c4027c26b640d6d03f0f43125cc9fdd515bb2241cb6d

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