horde/image 问题修复 & 功能扩展

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

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

horde/image

Composer 安装命令:

composer require horde/image

包简介

Image library

README 文档

README

Image manipulation library for PHP 8.1+ with multiple backend support.

Features

  • Multiple backends - ImagickDriver, GdDriver, ImDriver (CLI), SvgDriver, PngDriver (pure PHP), NullDriver
  • Interface Segregation - ImageDriver for single images, SequenceDriver for animation/multi-frame
  • Immutable resources - all operations return new ImageResource instances
  • Drawing API - path-based DrawingContext with state stack, SVG output and brush shapes
  • Filters - Brightness, Contrast, Gamma, Grayscale, Colorize, Modulate, Sepia, Negate, Sharpen, Pixelate, Blur
  • Effects - TextWatermark, PolaroidImage, PhotoStack, Border, DropShadow, RoundCorners, SmartCrop, CenterCrop, LiquidResize, Composite
  • Metadata - EXIF/IPTC/XMP reading with GPS parsing and MakerNote support
  • Sequences - multi-frame image support (animated GIF, APNG) via ImagickDriver
  • Color utilities - named colors (140+ CSS names), lighten/darken/intensify and brightness calculation
  • Named font sizes - FontSize enum with bidirectional point-value lookup
  • DI-friendly - ImageFactory wrapper, all drivers are constructor-injectable

Requirements

  • PHP 8.1+
  • At least one of: ext-imagick, ext-gd or ImageMagick CLI tools. A Pure PHP driver exists for a subset of features.

Installation

composer require horde/image

Quick Start

use Horde\Image\Driver\ImagickDriver;
use Horde\Image\Color\Color;
use Horde\Image\Format\ImageFormat;
use Horde\Image\Geometry\Size;

$driver = new ImagickDriver();
$image = $driver->create(new Size(800.0, 600.0), Color::named('white'));

$resized = $image->resize(new Size(400.0, 300.0));
$data = $driver->encode($resized, ImageFormat::JPEG);
file_put_contents('output.jpg', $data);

See doc/USAGE.md for full documentation. See doc/UPGRADING.md for upgrading calling code from legacy lib/ format or older versions. See doc/COPYING-EXIF.md for copyright and licensing clarification on exifer code included.

License

LGPL-2.1-only. See LICENSE for details.

统计信息

  • 总下载量: 2.23k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 0
  • 依赖项目数: 8
  • 推荐数: 2

GitHub 信息

  • Stars: 2
  • Watchers: 5
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: LGPL-2.1-only
  • 更新时间: 2023-10-26

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固