PHPackages                             gdevilbat/gdimage - 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. gdevilbat/gdimage

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

gdevilbat/gdimage
=================

Easy to use image manipulation tool based on PHP-GD extension

v1.6(2y ago)07MITPHPPHP &gt;=5.6.0

Since Feb 16Pushed 2y agoCompare

[ Source](https://github.com/gdevilbat/GDImage)[ Packagist](https://packagist.org/packages/gdevilbat/gdimage)[ Docs](https://github.com/delfimov/gdimage/)[ RSS](/packages/gdevilbat-gdimage/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (2)Versions (3)Used By (0)

[![Latest Stable Version](https://camo.githubusercontent.com/e3f8e12287b183cca915ad66d5d65ca087bce42c6b7981f8da7fc467d1bf35c0/68747470733a2f2f706f7365722e707567782e6f72672f64656c66696d6f762f6764696d6167652f762f737461626c65)](https://packagist.org/packages/delfimov/gdimage)[![Build Status](https://camo.githubusercontent.com/56489bff35912ff030cc9992ed1b5ab71b438b013c01561eda02ba51212bfada/68747470733a2f2f7472617669732d63692e6f72672f64656c66696d6f762f4744496d6167652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/delfimov/GDImage)[![StyleCI](https://camo.githubusercontent.com/e060b69a48caafddd740f1cbe8fdfd28b9286a1d01446ded54434382c708946f/68747470733a2f2f7374796c6563692e696f2f7265706f732f39393133353035362f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/99135056)[![SensioLabsInsight](https://camo.githubusercontent.com/d3f2805204832f3c0cf1ddfd03989b737959b0f1240a7754f3b7c5cabd0e20b4/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f61366162323833652d616332362d346666322d396237312d3961613266306134356662632f6d696e692e706e67)](https://insight.sensiolabs.com/projects/a6ab283e-ac26-4ff2-9b71-9aa2f0a45fbc)[![License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](https://github.com/delfimov/GDImage/blob/master/LICENSE)

GDImage
=======

[](#gdimage)

Easy to use image manipulation tool based on PHP-GD extension.

Key features
------------

[](#key-features)

- Easy to use.
- JPEG, PNG, GIF, WEBP support.
- Method chaining.
- JPEG autorotation (ext-exif required) based on EXIF header
- Easy to resize, crop, rotate, add text, flip, merge, set opactity

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

[](#requirements)

- [PHP &gt;= 5.4](http://www.php.net/)
- [PHP GD](http://php.net/manual/image.installation.php)

How to install
--------------

[](#how-to-install)

```
composer require delfimov/gdimage
```

or add this line to your composer.json file:

```
"delfimov/gdimage": "~1.0"
```

Alternatively, copy the contents of the gdimage folder into one of your project's directories and `require 'src/GDImage.php';`.

A Simple Example
----------------

[](#a-simple-example)

```
// initialize GDImage
$image = new GDImage('path/to/image.jpg');

// set fill color for empty image areas
$image->setFillColor([255, 0, 0]);

// Resize image. By default images are resized proportional and are not cropped,
// with empty areas filled with color specified in setFillColor() method
$image->resize(1280, 720);

/* Add text to image
The first parameter is text to add,
the second parameter is optional, by default equals to:
[
    'size' => 20,
    'angle' => 0,
    'x' => 0,
    'y' => 0,
    'color' => [0, 0, 0],
    'font' => '/../fonts/Roboto-Medium.ttf'
]
*/
$image->addText(
    'Sample text to add',
    [
        'font' => __DIR__ . '/../fonts/Roboto-Medium.ttf',
        'size' => 18,
        'x' => 150,
        'y' => 100,
        'color' => [255, 0, 0]
    ]
);

// Save image
$image->save('path/to/newimage.jpg');
```

TODO
----

[](#todo)

- Examples
- Readme
- More unit tests
- Animated gifs support

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 92.7% 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

868d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0f8eabb8b45fb6f1927cf763da55becf23800d84d262b17f82daaa656f5a17de?d=identicon)[gdevilbat](/maintainers/gdevilbat)

---

Top Contributors

[![delfimov](https://avatars.githubusercontent.com/u/703273?v=4)](https://github.com/delfimov "delfimov (38 commits)")[![Ge1i0N](https://avatars.githubusercontent.com/u/6265043?v=4)](https://github.com/Ge1i0N "Ge1i0N (2 commits)")[![gdevilbat](https://avatars.githubusercontent.com/u/13155181?v=4)](https://github.com/gdevilbat "gdevilbat (1 commits)")

---

Tags

imagegdresizewatermarkmergerotateoverlayphp-gd

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/gdevilbat-gdimage/health.svg)

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

###  Alternatives

[intervention/image

PHP Image Processing

14.3k208.9M2.6k](/packages/intervention-image)[sybio/image-workshop

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

854945.6k12](/packages/sybio-image-workshop)[intervention/image-laravel

Laravel Integration of Intervention Image

1588.9M182](/packages/intervention-image-laravel)[masterexploder/phpthumb

A library for manipulating images in PHP.

980769.1k17](/packages/masterexploder-phpthumb)[jbzoo/image

A PHP class that simplifies working with images

174129.4k3](/packages/jbzoo-image)[coldume/imagecraft

A reliable and extensible PHP image manipulation library

10034.1k2](/packages/coldume-imagecraft)

PHPackages © 2026

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