david-garcia / liip-imagine-pack
LiipImagineBundle 的模糊和像素化过滤器
dev-master
2024-04-09 14:11 UTC
Requires
- php: >=8.2,<9.0
- liip/imagine-bundle: ^2.5
- symfony/framework-bundle: ^7.0
Requires (Dev)
- roave/security-advisories: dev-latest
- symfony/test-pack: ^1.1
Suggests
- ext-gd: *
- ext-gmagick: *
- ext-imagick: *
This package is auto-updated.
Last update: 2024-09-09 15:16:16 UTC
README
此 Symfony Bundle 添加了一组新的过滤器,这些过滤器不是 Liip Imagine Bundle 的内置部分
- 模糊图像
- 像素化图像
安装
基本要求
- PHP 8.x (https://php.ac.cn/)
- Symfony 7.x (https://symfony.ac.cn/download)
- Liip Imagine Bundle (https://github.com/liip/LiipImagineBundle)
PHP 要求
- 以下至少一个图像处理扩展
安装步骤
# ...
使用方法
只需在您的 liip_imagine.yaml
配置文件中创建一个新的过滤器集
# config/packages/liip_imagine.yaml liip_imagine: # Liip Imagine Bundle settings # ... filter_sets: # Other filter sets # ... # Blur filter blur: data_loader: stream.your_data_loader quality: 90 filters: blur_filter: start: [500, 230] # starting points x and y size: [100, 200] # width and height # Pixelate filter pixelate: data_loader: stream.your_data_loader quality: 90 filters: pixelate_filter: start: [500, 230] # starting points x and y size: [100, 200] # width and height type: ellipse # default is rectangle intensity: 16 # you can omit this, default is 16
示例
之前
之后
分支说明 & 致谢
该项目是从 https://github.com/neok/LiipImagineAdditionalFiltersBundle 分支出来的,并且已经更新以兼容 PHP 8.x 和 Symfony 7 要求。
原始代码已经更新以兼容较新版本,但仍归原始作者所有。