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

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

rundiz/image
============

Image manipulation use GD or Imagick as drivers. It support watermark image or text, resize, crop, rotate, transparency gif or png and also support animation gif (Imagick only).

3.1.6(5mo ago)14832MITPHPPHP &gt;=5.4.0CI failing

Since Apr 22Pushed 3mo ago1 watchersCompare

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

READMEChangelog (10)Dependencies (1)Versions (11)Used By (0)

Image manipulation
==================

[](#image-manipulation)

Simple image manipulation that use GD or Imagick as drivers.

Features:
---------

[](#features)

### File extensions supported

[](#file-extensions-supported)

- AVIF (AVIFS)`*`
- GIF
- JPG (JPEG)
- PNG
- WEBP`*`

### Functional

[](#functional)

- Crop
- Flip (Require PHP 5.5+ for GD driver.)
- Resize (aspect ratio and not)
- Rotate
- Watermark image (including alpha transparency.)
- Watermark text (including alpha transparency.)
- Supported alpha transparency or transparent AVIF, GIF, PNG, WEBP.
- Supported animated GIF, WEBP`*` (Imagick only).

[![Latest Stable Version](https://camo.githubusercontent.com/9795d8a858f2cdba05d3163d4e348ab78894178162e4a3bc6d3b92f5bbf0a677/68747470733a2f2f706f7365722e707567782e6f72672f72756e64697a2f696d6167652f762f737461626c65)](https://packagist.org/packages/rundiz/image)[![License](https://camo.githubusercontent.com/dc7d9c7d5e6959b09c9c547957520c0f9196c6ad419c6b9211857c0f08010b41/68747470733a2f2f706f7365722e707567782e6f72672f72756e64697a2f696d6167652f6c6963656e7365)](https://packagist.org/packages/rundiz/image)[![Total Downloads](https://camo.githubusercontent.com/e2ea0d2eb0a5e48cf1fef1bb395bfc4a8f2e834689da672dd735649abac375e6/68747470733a2f2f706f7365722e707567782e6f72672f72756e64697a2f696d6167652f646f776e6c6f616473)](https://packagist.org/packages/rundiz/image)

Tested up to PHP 8.5.

Example
-------

[](#example)

### Drivers

[](#drivers)

#### Gd driver

[](#gd-driver)

```
$Image = new \Rundiz\Image\Drivers\Gd('/path/to/source-image.jpg');
```

#### Imagick driver

[](#imagick-driver)

```
$Image = new \Rundiz\Image\Drivers\Imagick('/path/to/source-image.jpg');
```

#### Fallback drivers

[](#fallback-drivers)

You can use multiple drivers as fallback if it does not support.

```
if (extension_loaded('imagick') === true) {
    $Image = new \Rundiz\Image\Drivers\Imagick('/path/to/source-image.jpg');
} else {
    $Image = new \Rundiz\Image\Drivers\Gd('/path/to/source-image.jpg');
}
```

### Image manipulation methods

[](#image-manipulation-methods)

```
// Crop an image
$Image->crop(400, 400, 'center', 'middle');// crop start from center of X and Y
$Image->crop(400, 400, 20, 90);// crop start from X 20 and Y 90

// Resize
$Image->resize(600, 400);
// Resize without aspect ratio
$Image->resizeNoRatio(500, 300);

// Rotate
$Image->rotate();// 90 degree
$Image->rotate(180);
$Image->rotate(270);

// Flip
$Image->rotate('hor');// horizontal
$Image->rotate('vrt');//  vertical
$Image->rotate('horvrt');// both horizontal and vertical

// Watermark image
$Image->watermarkImage('/var/www/image/watermark.png', 'center', 'middle');
$Image->watermarkImage('/var/www/image/watermark.png', 50, 90);// watermark start from X 50 and Y 90

// Watermark text
$Image->watermarkText('hello world', '/var/www/fonts/myfont.ttf', 'center', 'middle', 16);
$Image->watermarkText('hello world', '/var/www/fonts/myfont.ttf', 50, 90, 16);// watermark start from X 50 and Y 90
```

#### Multiple image process

[](#multiple-image-process)

```
$Image = new \Rundiz\Image\Drivers\Gd('/path/to/source-image.jpg');
$Image->resize(900, 600);
$Image->save('/path/to/new-file-name-900x600.jpg');
// Use method clear() to clear all processed data
// and start new image process with the same image source.
$Image->clear();
$Image->resize(300, 100);
$Image->save('/path/to/new-file-name-300x100.jpg');
```

For more details, please look in tests folder or see [API doc](http://apidocs.rundiz.com/image/)

---

Remark:

- `*`AVIF

    - PHP and Imagick that use [ImageMagick prior 7.0.10-25](https://github.com/ImageMagick/ImageMagick/issues/1432) doesn't supported open or save AVIF.
        Some older system may be able to save but the file's mime type will not changed.
    - PHP and [Imagick (depend on ImageMagick)](https://github.com/ImageMagick/ImageMagick/issues/6380) doesn't supported animated AVIF (AVIFS).
    - PHP 8.3 and older with GD doesn't supported some kind of AVIF ([reference](https://github.com/php/php-src/issues/13919)).
    - PHP prior 8.1 with GD doesn't supported AVIF.
- `*`WEBP

    - PHP and Imagick that use [ImageMagick prior 7.0.8.68](https://github.com/ImageMagick/ImageMagick/pull/1708) doesn't supported open or save animated WEBP.
    - PHP all version ([last checked 8.5](https://www.php.net/manual/en/function.imagecreatefromwebp.php)) with GD doesn't supported animated WEBP.
    - PHP prior 7.0 with GD (ref. [1](https://github.com/rosell-dk/webp-convert/issues/238#issuecomment-545928597), [2](https://stackoverflow.com/a/58543717/128761)) doesn't supported open or save transparent WEBP.
    - PHP prior 5.6 with GD doesn't fully supported WEBP and may cause image becomes green. Tested with PHP on Windows.

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance76

Regular maintenance activity

Popularity16

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity64

Established project with proven stability

 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 ~389 days

Recently: every ~157 days

Total

10

Last Release

166d ago

PHP version history (2 changes)v3.0PHP &gt;=5.3.0

3.1.0PHP &gt;=5.4.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1568262?v=4)[vee w,](/maintainers/ve3)[@ve3](https://github.com/ve3)

---

Top Contributors

[![ve3](https://avatars.githubusercontent.com/u/1568262?v=4)](https://github.com/ve3 "ve3 (211 commits)")

---

Tags

cropgdimage-manipulationimage-processingimagickresizeresize-imagesrotatethumbnailimagewatermarkanimationanimated gifresize imagecrop imagerotate imagetransparency image

### Embed Badge

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

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

###  Alternatives

[intervention/image

PHP Image Processing

14.3k194.3M2.2k](/packages/intervention-image)[sybio/image-workshop

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

860918.1k11](/packages/sybio-image-workshop)[intervention/image-laravel

Laravel Integration of Intervention Image

1496.5M102](/packages/intervention-image-laravel)[coldume/imagecraft

A reliable and extensible PHP image manipulation library

10133.7k2](/packages/coldume-imagecraft)[folklore/image

Image manipulation library for Laravel 5 based on Imagine and inspired by Croppa for easy url based manipulation

270248.2k5](/packages/folklore-image)[jbzoo/image

A PHP class that simplifies working with images

171126.9k3](/packages/jbzoo-image)

PHPackages © 2026

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