承接 intervention/image-driver-vips 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

intervention/image-driver-vips

最新稳定版本:1.0.10

Composer 安装命令:

composer require intervention/image-driver-vips

包简介

libvips driver for Intervention Image

README 文档

README

Latest Version Build Status Monthly Downloads Support me on Ko-fi

Intervention Image's official driver to use Intervention Image with libvips. libvips is a fast, low-memory image processing library that outperforms the standard PHP image extensions GD and Imagick. This package makes it easy to utilize the power of libvips in your project while taking advantage of Intervention Image's user-friendly and easy-to-use API.

Installation

You can easily install this library using Composer. Simply request the package with the following command:

composer require intervention/image-driver-vips

Getting Started

The public API of Intervention Image can be used unchanged. The only configuration that needs to be done is to ensure that Intervention\Image\Drivers\Vips\Driver by this library is used by Intervention\Image\ImageManager.

Code Examples

use Intervention\Image\ImageManager;
use Intervention\Image\Drivers\Vips\Driver as VipsDriver;

// create image manager with vips driver
$manager = ImageManager::withDriver(VipsDriver::class);

// open an image file
$image = $manager->read('images/example.gif');

// resize image instance
$image->resize(height: 300);

// insert a watermark
$image->place('images/watermark.png');

// encode edited image
$encoded = $image->toJpg();

// save encoded image
$encoded->save('images/example.jpg');

Requirements

  • PHP >= 8.1

Caveats

  • Due to the technical characteristics of libvips, it is currently not possible to implement color quantization via ImageInterface::reduceColors() as intended. However, there is a pull request in libvips that enables this feature and it may be integrated here the future as well.

  • With PHP on macOS, font files are not recognized in the ImageInterface::text() call by default because Quartz as a rendering engine does not allow font files to be loaded at runtime via the fontconfig API. However, setting the environment variable PANGOCAIRO_BACKEND to fontconfig helps here.

Authors

This library was developed by Oliver Vogel and Thomas Picquet.

License

Intervention Image Driver Vips is licensed under the MIT License.

统计信息

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

GitHub 信息

  • Stars: 40
  • Watchers: 2
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-12-19