zenstruck / imagine-extra-bundle
该包已被废弃,不再维护。未建议替代包。
将 imagine-filters 库集成到 Symfony2 中
v1.1.0
2014-12-05 18:38 UTC
Requires
- symfony/dependency-injection: ~2.1
- symfony/http-kernel: ~2.1
- zenstruck/imagine-filters: ~1.2
Requires (Dev)
Suggests
- avalanche123/imagine-bundle: For integration with AvalancheImagineBundle
- liip/imagine-bundle: For integration with LiipImagineBundle
This package is auto-updated.
Last update: 2020-10-28 14:17:20 UTC
README
将 imagine-filters 库集成到 Symfony2。
注意:此包需要 LiipImagineBundle 或 AvalancheImagineBundle 之一。
安装
-
添加到您的
composer.json
composer require zenstruck/imagine-extra-bundle
-
在 Symfony2 中注册该包
// app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Zenstruck\Bundle\ImagineExtraBundle\ZenstruckImagineExtraBundle(), ); // ... }
SquareThumbnailFilter
-
与 LiipImagineBundle 一起使用
# app/config/config.yml liip_imagine: filter_sets: square_200: filters: square_thumbnail: { size: 200, color: 000000 }
-
与 AvalancheImagineBundle 一起使用
# app/config/config.yml avalanche_imagine: filters: square_200: type: square_thumbnail options: { size: 200, color: 000000 }
默认配置
color: FFFFFF transparency: 0