PHPackages                             edouardtack/initialatar - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Image &amp; Media](/categories/media)
4. /
5. edouardtack/initialatar

AbandonedLibrary[Image &amp; Media](/categories/media)

edouardtack/initialatar
=======================

Avatar with initials

08PHP

Since Aug 5Pushed 9y ago1 watchersCompare

[ Source](https://github.com/EdouardTack/initialatar)[ Packagist](https://packagist.org/packages/edouardtack/initialatar)[ RSS](/packages/edouardtack-initialatar/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

PHP avatar with initial's name
==============================

[](#php-avatar-with-initials-name)

This create an avatar with the first letters of the names, or with the first letter of one string.

Requirements
------------

[](#requirements)

- PHP &gt;= 7
- GD library
- FreeType library

Load it
-------

[](#load-it)

Load the library with composer

```
php composer.phar require edouardtack/initialatar "dev-master"
```

OR add this lines to your `composer.json`

```
"require": {
	"edouardtack/initialatar": "dev-master"
}
```

And run `php composer.phar update`

Use it
------

[](#use-it)

### Instance the Initialatar

[](#instance-the-initialatar)

```
use Initialatar\Initialatar;

$oInitialatar = new Initialatar([
    'name'      => "Edouard Tack",
    'width'     => 50,
    'height'    => 50,
    'ellipse'   => true,
    'font'      => true
]);

// Create the image ressource
$oInitialatar->create();

// Save to file
$oInitialatar->save('test.png');
```

### Display in your view

[](#display-in-your-view)

```
