Skip to content

sintrb/oneimage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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!

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages