PHPackages                             gavande/extensions - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. gavande/extensions

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

gavande/extensions
==================

1.0(8y ago)04MITPHPPHP &gt;=5.4.0

Since Apr 29Pushed 8y ago1 watchersCompare

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

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

File Extensions
===============

[](#file-extensions)

Provide a simple way to generate any file icon so that you don't to download icon each extension type.

Install
-------

[](#install)

```
composer require "gavande/extensions"

```

Usage
-----

[](#usage)

### Generate a extension icon

[](#generate-a-extension-icon)

```
$icon = new Extensions\FileExtension();

$icon->generate('png', 40)->saveAsPng('/path/to/file.png');

# If you don't specify a size, the max size will be used (240 by default)

```

### Custom font

[](#custom-font)

The font used by default is Open Sans Regular from google font. If you want, you can use any TTF font by setting the font file full path like so :

```
$icon->setFontFile('path/to/ttf_file.ttf')
    ->generate('png', 40)
    ->saveAsPng('/path/to/file.png');

```

### Save as jpeg

[](#save-as-jpeg)

```
$icon->generate('png')
    ->saveAsJpeg('/path/to/file.jpg');

```

### Save as png

[](#save-as-png)

```
$icon->generate('png')
    ->saveAsPng('/path/to/file.png');

```

### Text color

[](#text-color)

```
$icon->setTextColor([255, 0, 0])
    ->generate('png')
    ->saveAsJpeg('/path/to/file.jpg');

```

### Text shadow

[](#text-shadow)

```
$icon
    ->setTextColor([255, 0, 0])
    ->generate('png')
    ->showTextShadow(false)
    ->saveAsJpeg('/path/to/file.jpg');

```

### Background colors palette

[](#background-colors-palette)

```
$icon
    ->setBackgroundColors([[255, 0, 0], [0, 255, 0], [0, 0, 255]])
    ->generate('png')
    ->saveAsJpeg('/path/to/file.jpg');

```

### Using the same background color

[](#using-the-same-background-color)

You can chain multiple generation to keep the same background color. (Generating multiple sizes)

```
$icon
    ->generate('png', 50)->saveAsJpeg('/path/to/50x50/file.jpg')
    ->generate('png', 100)->saveAsJpeg('/path/to/100x100/file.jpg');

```

### Reset background color

[](#reset-background-color)

If you want you can reset background color (so that a new random one will be used) in the middle of chaining

```
$icon
    ->generate('png', 50)->saveAsJpeg('/path/to/50x50/file.jpg')
    ->generate('png', 100)->saveAsJpeg('/path/to/100x100/file.jpg')
    ->resetBackgroundColor()
    ->generate('png', 100)->saveAsJpeg('/path/to/100x100/file.jpg');

```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2937d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d36190d0a31102f4a6a32752b3ee8b63a73aea7170c78fbe0844e04d56898514?d=identicon)[gavande](/maintainers/gavande)

---

Top Contributors

[![rahi-cube](https://avatars.githubusercontent.com/u/7456705?v=4)](https://github.com/rahi-cube "rahi-cube (3 commits)")

---

Tags

generatoravatarletter

### Embed Badge

![Health badge](/badges/gavande-extensions/health.svg)

```
[![Health](https://phpackages.com/badges/gavande-extensions/health.svg)](https://phpackages.com/packages/gavande-extensions)
```

###  Alternatives

[symfony/maker-bundle

Symfony Maker helps you create empty commands, controllers, form classes, tests and more so you can forget about writing boilerplate code.

3.4k111.1M568](/packages/symfony-maker-bundle)[simplesoftwareio/simple-qrcode

Simple QrCode is a QR code generator made for Laravel.

2.9k27.6M92](/packages/simplesoftwareio-simple-qrcode)[tomloprod/radiance

A deterministic mesh gradient avatar generator for PHP.

1393.7k](/packages/tomloprod-radiance)[tequilarapido/letter-avatar

Provide a simple way to create letter avatar images, like those in your Gmail inbox

1218.8k](/packages/tequilarapido-letter-avatar)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
