PHPackages                             jlaso/gd-wrapper - 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. jlaso/gd-wrapper

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

jlaso/gd-wrapper
================

A GD wrapper

1.2(9y ago)133[1 issues](https://github.com/jlaso/gd-wrapper/issues)MITPHPPHP &gt;=5.6

Since Oct 2Pushed 9y ago1 watchersCompare

[ Source](https://github.com/jlaso/gd-wrapper)[ Packagist](https://packagist.org/packages/jlaso/gd-wrapper)[ Docs](https://github.com/jlaso/gd-wrapper)[ RSS](/packages/jlaso-gd-wrapper/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (2)Used By (0)

image
=====

[](#image)

image wrapper for PHP GD image

I created this package with the only intention to write compact and understandable scripts.

The idea is to use this:

```
$image = new Image(800, 600);

$image
    ->createColor('black', new Color(['R' => 0, 'G' => 0, 'B' => 0]))
    ->createColor('white', new Color(['R' => 255, 'G' => 255, 'B' => 255]))
    ->setColor('black')
    ->fill()
    ->setColor('white')
    ->fill(new Ellipse(new Point(400, 300), 200, 150))
    ->setColor('black')
    ->fill(new Circle(new Point(400, 300), 100))
    ->setColor('white')
    ->fill(new Circle(new Point(400, 300), 30))
    ->saveAsPng('/tmp/eye.png');

```

Instead of this:

```
$image = imagecreate(800, 600);

$black = imagecolorallocate($image, 0, 0, 0);
$white = imagecolorallocate($image, 255, 255, 255);

imagefill($image, 0, 0, $black);

imagefilledellipse($image, 400, 300, 200, 150, $white);
imagefilledellipse($image, 400, 300, 100, 100, $black);
imagefilledellipse($image, 400, 300, 30, 30, $white);

imagepng($image, '/tmp/eye.png');

```

Example to write ellipses and circles:

```
php sample-eye.php && open /tmp/eye.png

```

[![Eye example](/doc/eye.png)](/doc/eye.png)

Example to write polygons:

```
php sample-penta.php && open /tmp/penta.png

```

[![Polygon example](/doc/penta.png)](/doc/penta.png)

Example to write text: take a look over sample-text.php

```
php sample-text.php && open /tmp/text.png

```

[![Text example](/doc/text.png)](/doc/text.png)

Example to use palette:

```
php sample-palette.php && open /tmp/palette.png

```

[![Palette example](/doc/palette.png)](/doc/palette.png)

Internal palettes had been imported from [Jam3/nice-color-palettes](https://github.com/Jam3/nice-color-palettes)

[![200 palettes](https://camo.githubusercontent.com/d21f9ee0b3a4ba5dc5fe9b02a3cedb9da686cd3b/68747470733a2f2f692e696d6775722e636f6d2f5859594d3471702e706e67)](https://camo.githubusercontent.com/d21f9ee0b3a4ba5dc5fe9b02a3cedb9da686cd3b/68747470733a2f2f692e696d6775722e636f6d2f5859594d3471702e706e67)

[How to edit this file](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet)

###  Health Score

21

—

LowBetter than 21% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity9

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

3458d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6f19216fd9d91bd7cfff14362e2ddb5728bd2d8f50d2e0174626fc61510ed33b?d=identicon)[jlaso](/maintainers/jlaso)

---

Top Contributors

[![jlaso](https://avatars.githubusercontent.com/u/1332197?v=4)](https://github.com/jlaso "jlaso (7 commits)")

---

Tags

imagegdgraphics

### Embed Badge

![Health badge](/badges/jlaso-gd-wrapper/health.svg)

```
[![Health](https://phpackages.com/badges/jlaso-gd-wrapper/health.svg)](https://phpackages.com/packages/jlaso-gd-wrapper)
```

###  Alternatives

[intervention/image

PHP Image Processing

14.3k190.0M1.9k](/packages/intervention-image)[league/glide

Wonderfully easy on-demand image manipulation library with an HTTP based API.

2.6k50.5M101](/packages/league-glide)[gregwar/image

Image handling

1.0k4.0M48](/packages/gregwar-image)[sybio/image-workshop

Powerful PHP class using GD library to work easily with images including layer notion (like Photoshop or GIMP)

860908.4k10](/packages/sybio-image-workshop)[intervention/image-laravel

Laravel Integration of Intervention Image

1445.8M76](/packages/intervention-image-laravel)[intervention/gif

Native PHP GIF Encoder/Decoder

5518.1M9](/packages/intervention-gif)

PHPackages © 2026

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