Initials Avatar Generator
This api was written by Carl Williams - aka TheRandomCrafter83.
Description: REST API used to generate a basic avatar using the supplied initials, width, and height and returning a png file that can either be downloaded or embedded.

Link Prefix


Example Usage:


Parameters

= Not Required
= Required
action
Optional action code to be used for one of the following(Note:omit this parameter to draw the avatar image.):
  • listfonts or 1: Lists all available fonts.
  • usage or 2: Shows this documentation.
  • listfonts-json or 3: Returns a json represented list of fonts.
  • uploadfont or 4: Supplies a form to upload a font of your own.
    • Please note: to upload your own font for use, you will need to supply a valid email address. You will receive a verification email. You will need to verify your email address in order for your font to show up for availability. Also, be aware that the font that you upload will be publicly available for any to use. Use of this form indicates that you agree to my terms and that the font you upload is not copy-righted. If the font is found to be copy-righted, it will be subject for removal. Thank you.
initials
Desired text to be drawn on the avatar. Usual the First and Last initial of a user's name.
width
Desired image width in pixels. Default width is 400 pixels.
height
Desired image height in pixels. Default height is 400 pixels.
text-color
Desired text color. Default color is white. Colors are to be entered as an HTML color string without the # symbol. Example: #56f465 would be 56f465.
bg-color
Desired background color. Default color is rgba(0, 0, 0, 0.22). Colors are to be entered as an HTML color string without the # symbol. Example: #56f465 would be 56f465.
font-family
Desired font for the initials to be drawn in. Use action=1 or action=listfonts to see all available fonts. If you don't see a font you wish to use, you can email a request a font to be added to support@random-software.com. If possible, attatch the ttf font file to that email. Enter the font name exactly as you see it in the list(spaces and all)
font-bold
Draws the font in a bold style
corner-radius
Desired corner radius. Default radius is 0. The returned image will be a square/rectangle with no rounded corners.
font-size
Desired font size of text. Default font size is 200
text-decoration
Text Decoration:
  1. Normal - use a value of 1
  2. Underlined = use a value of 2
  3. Overlined = use a value of 3
  4. Strike through = use a value of 4
example: text-decoration=3
border-thickness
Desired border thickness. Default is 0.
border-color
Desired Border Color. Default color is rgba(0, 0, 0, 0.22) or 000000. Colors are to be entered as an HTML color string without the # symbol. Example: #56f465 would be 56f465.