fyii / imagefilters
Image filters for the FYii Imagefilter extension
Installs: 281
Dependents: 0
Suggesters: 1
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- fyii/imagefilter: ^1.0
- yiisoft/yii2: ~2.0.0
- yiisoft/yii2-imagine: ^2.1
This package is not auto-updated.
Last update: 2018-11-14 02:55:07 UTC
README
This package provides image filters for the FYii Imagefilter extension.
Currently, the following filter is available:
-
fyii\imagefilters\Thumbnail
(width
,height
,mode
) - create a thumbnail for an image. Mode is eitherTHUMBNAIL_INSET
orTHUMBNAIL_OUTBOUND
(default) constants defined inImagine\Image\ImageInterface
. See https://www.yiiframework.com/extension/yiisoft/yii2-imagine/doc/api/2.2/yii-imagine-baseimage#thumbnail()-detail -
fyii\imagefilters\Resize
(width
,height
,keepAspectRatio
,allowUpscaling
) - resize na image. See https://www.yiiframework.com/extension/yiisoft/yii2-imagine/doc/api/2.2/yii-imagine-baseimage#resize()-detail
Patches for more filters are welcome.
How to use
Add these filters to your FYii Imagefilter pipelines:
[ 'class' => 'flaviovs\imagefilters\Thumbnail', 'width' => 100, 'height' => 100, 'mode' => \Imagine\Image\ImageInterface::THUMBNAIL_INSET, ]