kehet/imagick-layout-engine 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

kehet/imagick-layout-engine

最新稳定版本:3.2.0

Composer 安装命令:

composer require 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.

README 文档

README

Logo Imagick Layout Engine

Build Status Total Downloads Latest Stable Version License

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

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

Installation

You can install the package via composer:

composer require kehet/imagick-layout-engine

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.

Testing

composer test

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

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

Please see ROADMAP for more information on the future of this project.

Changelog

Please see CHANGELOG for more information on what has changed recently.

Credits

License

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

统计信息

  • 总下载量: 817
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固