david-garcia/liip-imagine-pack

LiipImagineBundle 的模糊和像素化过滤器

安装: 6

依赖项: 0

建议者: 0

安全性: 0

星级: 0

关注者: 1

分支: 3

类型:symfony-bundle

dev-master 2024-04-09 14:11 UTC

This package is auto-updated.

Last update: 2024-09-09 15:16:16 UTC


README

此 Symfony Bundle 添加了一组新的过滤器,这些过滤器不是 Liip Imagine Bundle 的内置部分

  • 模糊图像
  • 像素化图像

安装

基本要求

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

示例

之前

before

之后

after

分支说明 & 致谢

该项目是从 https://github.com/neok/LiipImagineAdditionalFiltersBundle 分支出来的,并且已经更新以兼容 PHP 8.x 和 Symfony 7 要求。

原始代码已经更新以兼容较新版本,但仍归原始作者所有。