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

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

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

intervention/image-driver-vips

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 the library 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

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;
use Intervention\Image\Alignment;
use Intervention\Image\Format;

// create image manager instance using the desired driver
$manager = ImageManager::usingDriver(VipsDriver::class);

// read image data from path
$image = $manager->decodePath('images/example.webp');

// scale image by height
$image->scale(height: 300);

// insert a watermark
$image->insert('images/watermark.png', alignment: Alignment::BOTTOM_RIGHT);

// encode edited image
$encoded = $image->encodeUsingFormat(format: Format::JPEG, quality: 65);

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

Requirements

  • PHP >= 8.3
  • Foreign Function Interface (FFI) Extension

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.

intervention/image-driver-vips 适用场景与选型建议

intervention/image-driver-vips 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 191.1k 次下载、GitHub Stars 达 48, 最近一次更新时间为 2024 年 12 月 19 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「image」 「libvips」 「vips」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 intervention/image-driver-vips 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 intervention/image-driver-vips 我们能提供哪些服务?
定制开发 / 二次开发

基于 intervention/image-driver-vips 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 191.1k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 49
  • 点击次数: 28
  • 依赖项目数: 9
  • 推荐数: 6

GitHub 信息

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

其他信息

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