Installation
Install via Composer:
composer require renfordt/avatar-smithy
Dependencies
The package declares the following runtime requirements in composer.json:
php: ^8.4ext-gd: *meyfa/php-svg— SVG construction and rasterizationpsr/log— logging interface (PSR-3)renfordt/clamp— value clamping helperrenfordt/colors— color manipulation (HexColor,HSLColor)
Optional extension
imagick is listed under suggest. If the extension is loaded, the image
converter uses it for PNG, JPG, and WebP output. Without it, conversion falls
back to gd. WebP output through gd requires a build with WebP support
(imagewebp); otherwise use Imagick or choose PNG/JPG.
Autoloading
Classes live under the Renfordt\AvatarSmithy\ namespace, mapped to src/ via
PSR-4. After installation, include Composer's autoloader:
require 'vendor/autoload.php';
use Renfordt\AvatarSmithy\Avatar;