PHPackages                             kingjerod/php-image-tools - 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. kingjerod/php-image-tools

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

kingjerod/php-image-tools
=========================

An image manipulation library utilizing Imagick.

071PHP

Since Jun 8Pushed 11y agoCompare

[ Source](https://github.com/kingjerod/php-image-tools)[ Packagist](https://packagist.org/packages/kingjerod/php-image-tools)[ RSS](/packages/kingjerod-php-image-tools/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

PHPImageTools
=============

[](#phpimagetools)

[![Build Status](https://camo.githubusercontent.com/b6259c6604f452f8306945ebf2eff37c857d7ced543870f79d14ee595b30e229/68747470733a2f2f7472617669732d63692e6f72672f6b696e676a65726f642f7068702d696d6167652d746f6f6c732e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/kingjerod/php-image-tools)[![Coverage Status](https://camo.githubusercontent.com/d6e9a0314f13934c348866f0a861e22bb99310f8e5f73d93933f541cc7564ac2/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6b696e676a65726f642f7068702d696d6167652d746f6f6c732f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/r/kingjerod/php-image-tools?branch=master)[![Software License](https://camo.githubusercontent.com/074b89bca64d3edc93a1db6c7e3b1636b874540ba91d66367c0e5e354c56d0ea/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e737667)](LICENSE)

PHP library for image manipulation, uses modifiers to alter images. Simplifies some of the complicatedness of Imagick. Has a factory to help load remote images, and also find/manipulate images in folders.

Installation
------------

[](#installation)

This library requires PHP 5.4 and the Imagick PHP plugin to be installed. On some Unix systems this command should work:

`sudo apt-get install php5-imagick`

Once you have Imagick installed, use composer to install the library:

`composer require kingjerod\php-image-tools`

\##Usage ImageTools has two main classes, the **Image** class and the **Modifier** class. The Modifier classes are used to change an image, either through resizing, cropping or adding text. Multiple modifiers can be applied to an image, and the same modifier can be applied to multiple images.

\##Examples

\###First use the factory to load an image:

```
$factory = new ImageFactory();
$image = $factory->createFromLocalFile('/images/apple.png');
```

\###Once you have the image you can use different modifiers to change it: #####Scale an image:

```
$scale = new Scale(200, 300); //width, height
$image->modify($scale);
$image->save('/images/appleBig.png');
```

\#####Change opacity:

```
$opacity= new Opacity(0.8); //80% opacity (mostly visible)
$image->modify($opacity);
$image->save('/images/appleBig.png');
```

\#####Add a watermark:

```
$text = new Text(10, 40, 'Arial.tff', '#000', 0.3, 24, 'Copyright XYZ');
$image->modify($text);
$image->save('/images/appleCopyright.png');
```

\#####Merge two images together

```
$image2 = $factory->createFromLocalFile('/images/orange.png');
$merge = new Merge(10, 20, $image2);
$image->modify($merge);
$image->save('/images/appleAndOrange.png');
```

\#####Do a bunch of cool things

```
$image2 = $factory->createFromLocalFile('/images/orange.png');
$merge = new Merge(10, 20, $image2);
$image->modify($merge);
$text = new Text(10, 40, 'Arial.tff', '#000', 0.3, 24, 'Copyright XYZ');
$image->modify($text);
$opacity= new Opacity(0.8); //80% opacity (mostly visible)
$image->modify($opacity);
$image->save('/images/appleAndOrangeCrazy.png');
```

\##Custom Modifiers Creating your own modifiers is easy. Simple create your own class, and implement the **ModifierInterface**. It has one function:

`public function modify(Image $image);`

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/3cb1cd91e11b1cdd78c3c9ebea0adaa2fc1d86295e903a2b113d38cf8e3a3659?d=identicon)[kingjerod](/maintainers/kingjerod)

---

Top Contributors

[![kingjerod](https://avatars.githubusercontent.com/u/2287252?v=4)](https://github.com/kingjerod "kingjerod (9 commits)")

### Embed Badge

![Health badge](/badges/kingjerod-php-image-tools/health.svg)

```
[![Health](https://phpackages.com/badges/kingjerod-php-image-tools/health.svg)](https://phpackages.com/packages/kingjerod-php-image-tools)
```

###  Alternatives

[goat1000/svggraph

Generates SVG graphs

135911.1k3](/packages/goat1000-svggraph)[gravatarphp/gravatar

Gravatar URL builder which is most commonly called as a Gravatar library

16653.6k2](/packages/gravatarphp-gravatar)[rsoury/wp-imgix

Rewrites WordPress image URLs to use ImgIX

167.2k](/packages/rsoury-wp-imgix)

PHPackages © 2026

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