rokka/imagine-vips 问题修复 & 功能扩展

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

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

rokka/imagine-vips

Composer 安装命令:

composer require rokka/imagine-vips

包简介

libvips adapter for imagine

README 文档

README

Static analysis Latest Stable Version

This package provides a libvips integration for Imagine. The VIPS image processing system is a very fast, multi-threaded image processing library with low memory needs.

Version 8.7 or higher of libvips is highly recommended. paste and rotate by angles other than multipliers of 90 are not supported with older versions of libvips.

You either need the PHP FFI extension (recommended, since that's the currently supported way by the libvips maintainer) or the php-vips-ext extension version 1.0.8 or higher (you need to install that manually). And the php-vips classes (automatically installed by composer)

The most (to us at least) important stuff is implemented. There may be edge cases, which are not covered yet, but those will be hopefully fixed soon. Report them, if you encounter one.

Even it this is not a 1.0.0 release yet, the library is somehow battle tested as we use it on rokka.io.

Installation

Just run the following

composer require rokka/imagine-vips

and then you can use it like any other Imagine implementation with eg.

$imagine = new \Imagine\Vips\Imagine();

$size    = new Imagine\Image\Box(40, 40);
$mode    = Imagine\Image\ImageInterface::THUMBNAIL_INSET;

$imagine->open('/path/to/large_image.jpg')
    ->thumbnail($size, $mode)
    ->save('/path/to/thumbnail.png')

Missing stuff

Needs vips 8.6 or higher:

  • paste
  • rotate by angles other than multipliers of 90

Not implemented yet

  • Complete Drawer support, only text is.
  • Methods:
    • fill
    • histogram
  • Filters:
    • colorize

Most of them are not that important to us, so any contributions are welcome. Drawer for example may be a low hanging fruit, if you want to get into it.

Layers and Animated gifs

If you have vips 8.7.0, layers and animated gifs should work like with imagick.

Saving files

Natively supported by libvips for saving are jpg, png, webp and tiff. If you have vips 8.7.0 with imagemagick support, it will use vips "magicksave" for all other formats. It not, this adapter falls back to the Imagick or GD implementation.

Contribution

Any contribution is very appreciated, just file an issue or send a Pull Request.

rokka/imagine-vips 适用场景与选型建议

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

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

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

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

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

  • 总下载量: 640.56k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 43
  • 点击次数: 25
  • 依赖项目数: 5
  • 推荐数: 3

GitHub 信息

  • Stars: 43
  • Watchers: 4
  • Forks: 8
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-11-19