PHPackages                             kehet/imagick-layout-engine - 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. kehet/imagick-layout-engine

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

kehet/imagick-layout-engine
===========================

A PHP library for creating complex image layouts with automatic positioning and sizing. This library provides a flexbox-like approach to image composition, making it easy to create structured layouts with text, images, and shapes.

3.2.0(6mo ago)01.1k↓50%GPL-3.0-or-laterPHPPHP ^8.3CI passing

Since Jul 20Pushed 1mo agoCompare

[ Source](https://github.com/Kehet/imagick-layout-engine)[ Packagist](https://packagist.org/packages/kehet/imagick-layout-engine)[ Docs](https://github.com/kehet/imagick-layout-engine)[ GitHub Sponsors](https://github.com/Kehet)[ RSS](/packages/kehet-imagick-layout-engine/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (2)Versions (10)Used By (0)

[![Logo Imagick Layout Engine](/art/logo.svg)](/art/logo.svg)

 [![Build Status](https://github.com/Kehet/imagick-layout-engine/actions/workflows/run-tests.yml/badge.svg)](https://github.com/Kehet/imagick-layout-engine/actions) [![Total Downloads](https://camo.githubusercontent.com/a71c0d09b42b4a9c57c4a9bf64decef0d95338bfeeafdcdd9d9c77d48b4836f6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f4b656865742f696d616769636b2d6c61796f75742d656e67696e65)](https://packagist.org/packages/Kehet/imagick-layout-engine) [![Latest Stable Version](https://camo.githubusercontent.com/5ed118c026120fcafd8707d7227b768f4bc5f7fd9f94e1c384db9e9ce78bcf86/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f4b656865742f696d616769636b2d6c61796f75742d656e67696e65)](https://packagist.org/packages/Kehet/imagick-layout-engine) [![License](https://camo.githubusercontent.com/c8585e75dc636f8b6a3be1de1062a603920e84241762340b4e7e8e0a5d9046d7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f4b656865742f696d616769636b2d6c61796f75742d656e67696e65)](https://packagist.org/packages/Kehet/imagick-layout-engine)

A PHP library for creating complex image layouts with automatic positioning and sizing. This library provides a flexbox-like approach to image composition, making it easy to create structured layouts with text, images, and shapes.

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

[](#requirements)

- PHP 8.3 or later
- Linux (Windows not tested)
- Imagick PHP extension

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

[](#installation)

You can install the package via composer:

```
composer require kehet/imagick-layout-engine
```

Basic Usage
-----------

[](#basic-usage)

```
// Create a new image
$width = 1500;
$height = 1000;
$imagick = new Imagick();
$imagick->newImage($width, $height, new ImagickPixel('white'));

// Create a row container with rectangles
$frame = new RowContainer();
$frame->addItem(new Rectangle(draw(fill: '#fee2e2')));
$frame->addItem(new Rectangle(draw(fill: '#fca5a5')));
$frame->addItem(new Rectangle(draw(fill: '#dc2626')));
$frame->addItem(new Rectangle(draw(fill: '#450a0a')));

// Draw container onto image
$frame->draw($imagick, 0, 0, $width, $height);

// Output image as PNG
$imagick->setImageFormat('png');
$imagick->writeImage('output.png');
```

For more examples, see [documentation](https://kehet.github.io/imagick-layout-engine-docs).

Testing
-------

[](#testing)

```
composer test
```

### SAVE\_SNAPSHOT

[](#save_snapshot)

When set, if snapshot file is missing, snapshot image will be automatically written to `tests/__snapshots__/`.

```
SAVE_SNAPSHOT=1 composer test -- --filter=YourTest
```

### SAVE\_IMAGE\_DIFF

[](#save_image_diff)

When set, a visual diff image will be saved to `tests/temp/` whenever an image comparison is performed, regardless of pass/fail.

```
SAVE_IMAGE_DIFF=1 composer test -- --filter=YourTest
```

Roadmap
-------

[](#roadmap)

Please see [ROADMAP](ROADMAP.md) for more information on the future of this project.

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Credits
-------

[](#credits)

- [Kehet](https://github.com/Kehet)
- [All Contributors](../../contributors)

License
-------

[](#license)

GNU GENERAL PUBLIC LICENSE version 3 or later. Please see [License File](LICENSE) for more information.

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance80

Actively maintained with recent releases

Popularity18

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 77.6% 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 ~19 days

Recently: every ~29 days

Total

7

Last Release

187d ago

Major Versions

1.0.1 → 2.0.02025-07-20

2.1.0 → 3.0.02025-10-27

### Community

Maintainers

![](https://www.gravatar.com/avatar/67fd1adace52588fbcb71e6ec49ac344b88399d2bd7720e9de0b921cf9b536ab?d=identicon)[Kehet](/maintainers/Kehet)

---

Top Contributors

[![Kehet](https://avatars.githubusercontent.com/u/1544301?v=4)](https://github.com/Kehet "Kehet (52 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (13 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (2 commits)")

---

Tags

imagemagickphpimagickkehetimagick-layout-engine

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/kehet-imagick-layout-engine/health.svg)

```
[![Health](https://phpackages.com/badges/kehet-imagick-layout-engine/health.svg)](https://phpackages.com/packages/kehet-imagick-layout-engine)
```

###  Alternatives

[intervention/image

PHP Image Processing

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

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

2.6k51.2M116](/packages/league-glide)[rosell-dk/webp-convert

Convert JPEG &amp; PNG to WebP with PHP

6038.1M54](/packages/rosell-dk-webp-convert)[intervention/image-laravel

Laravel Integration of Intervention Image

1536.5M102](/packages/intervention-image-laravel)[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)[orbitale/imagemagick-php

A system that allows creating commands to send to the exec() function to use ImageMagick's powerful features.

43385.7k1](/packages/orbitale-imagemagick-php)

PHPackages © 2026

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