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

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

xicrow/php-image
================

PHP image manipulation

2.0.1(1y ago)08MITPHPPHP ~8.0

Since Sep 9Pushed 1y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (4)Used By (0)

Image
=====

[](#image)

PHP image manipulation

[![Packagist Latest Stable Version](https://camo.githubusercontent.com/0bd1a1f4c3d90470e079a7d4bdc530e473473baa7acdc8f8ccb83d3ab75c4fdc/68747470733a2f2f706f7365722e707567782e6f72672f786963726f772f7068702d696d6167652f762f737461626c65)](https://packagist.org/packages/xicrow/php-image)[![Packagist Total Downloads](https://camo.githubusercontent.com/f3c57ed7e62b7ca2018467e31078c25c4252d9c3cac756dea525bf69f4856ee6/68747470733a2f2f706f7365722e707567782e6f72672f786963726f772f7068702d696d6167652f646f776e6c6f616473)](https://packagist.org/packages/xicrow/php-image)

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

[](#installation)

The recommended way to install is through [Composer](https://getcomposer.org/).

```
composer require xicrow/php-image
```

```
{
	"require": {
		"xicrow/php-image": "~2.0"
	}
}
```

Usage
-----

[](#usage)

The idea is to build up a list of actions to perform on an image, and then saving the processed image.

Simple example, resize a given image to 500x500px and convert it to greyscale:

```
use Xicrow\PhpImage\Image\Action\FilterGreyScale;
use Xicrow\PhpImage\Image\Action\ResizeCrop;
use Xicrow\PhpImage\Image\Adapter\GDLibrary;

$strImagePath = '/path/to/image.jpg';
$oAdapter     = new GDLibrary($strImagePath);
$oAdapter->addAction(new ResizeCrop(500, 500));
$oAdapter->addAction(new FilterGreyScale());
$oAdapter->save('/path/to/converted/image.jpg');
```

Slightly more advanced example, resize a given image to 500x500px, adjust colors, adjust contrast and draw some lines:

```
use Xicrow\PhpImage\Image\Action\DrawLine;
use Xicrow\PhpImage\Image\Action\FilterColorize;
use Xicrow\PhpImage\Image\Action\FilterContrast;
use Xicrow\PhpImage\Image\Action\ResizeCrop;
use Xicrow\PhpImage\Image\Adapter\GDLibrary;

$strImagePath = '/path/to/image.jpg';
$oAdapter     = new GDLibrary($strImagePath);
$oAdapter->addAction(new ResizeCrop(500, 500));
$oAdapter->addAction(new FilterColorize(10, 25, 10));
$oAdapter->addAction(new FilterContrast(15));
$oAdapter->addAction(new DrawLine(25, 0, 25, 500));
$oAdapter->addAction(new DrawLine(475, 0, 475, 500));
$oAdapter->save('/path/to/converted/image.jpg');
```

TODO
----

[](#todo)

- PHPUnit tests

License
-------

[](#license)

Copyright © 2022 Jan Ebsen Licensed under the MIT license.

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance41

Moderate activity, may be stable

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

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

Every ~451 days

Total

3

Last Release

491d ago

Major Versions

1.0.0 → 2.0.02025-02-26

PHP version history (2 changes)1.0.0PHP ^7.4

2.0.0PHP ~8.0

### Community

Maintainers

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

---

Top Contributors

[![xicrow](https://avatars.githubusercontent.com/u/1567795?v=4)](https://github.com/xicrow "xicrow (3 commits)")

---

Tags

phpimagemanipulationtools

### Embed Badge

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

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

###  Alternatives

[talesoft/phim

An image and color manipulation and processing library for PHP

2959.0k1](/packages/talesoft-phim)[lciolecki/php-image-optimizer

PHP image file optimizer (uses https://github.com/bensquire/php-image-optim)

347.4k](/packages/lciolecki-php-image-optimizer)

PHPackages © 2026

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