/embodier

This is the Python PyPi library which will help you to generate dynamic profile images. (Eg. Most of the morden applications generates profile image for newly registered users)

Primary LanguagePythonMIT LicenseMIT

Dynamic Avatar Generator [API]

This library will help you to generate profile image for newly registered user on your application, like GitHub create profile picture for new users E.g.

75605781 (2)

Generated images

generatedimg New Project (3)

Usage

import embodier 

# Initialize image generator
obj = embodier.AvatarGenerator()
# To Generate block image
img = obj.BlockAvatar() 
img.show()

# To Generate text image
img = obj.TextAvatar('PP') 
img.show()

Advance

BlockAvatar generate bit block image
obj.BlockAvatar(row_columns,pixel_size,background_color)
@row_columns Integer, block size of row and columns, default 5
@pixel_size Integer, pixel size, default 300
@background_color String, background color of blocks in image, default lightgrey
@border Boolean, True to add border to image, False to without border image, default True

TextAvatar generate text image
obj.TextAvatar(text,background_color)
@text String, Text to print on image
@background_color String, background color of image, default random color

Export options
img.show() to open generated image
img.save('image.png') to save image with image name
obj.toBase64(img) to get Base64 value of generated image