https://github.com/elfsundae/intervention-image-filters
Intervention Image Filters
https://github.com/elfsundae/intervention-image-filters
Last synced: 12 months ago
JSON representation
Intervention Image Filters
- Host: GitHub
- URL: https://github.com/elfsundae/intervention-image-filters
- Owner: ElfSundae
- License: mit
- Created: 2017-06-18T22:55:55.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2022-07-12T15:06:52.000Z (about 4 years ago)
- Last Synced: 2025-06-04T16:52:54.818Z (about 1 year ago)
- Language: PHP
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Intervention Image Filters
[](https://packagist.org/packages/elfsundae/intervention-image-filters)
Filters for [`intervention/image`](https://github.com/Intervention/image) .
## Installation
```sh
$ composer require elfsundae/intervention-image-filters
```
## Usage
```php
use Intervention\Image\ImageManager as Image;
// use Intervention\Image\Facades\Image; // For Laravel
use ElfSundae\Image\Filters\Fit;
use ElfSundae\Image\Filters\Resize;
$image = Image::make($file)
->filter(new Resize(300, 400))
->save($path);
$image->filter(new Fit(320));
$image->filter(new Fit(320, 400, 'top-left'));
$image->filter(new Fit(320)->upsize(false));
$image->filter(new Resize(300, 600, $aspectRatio = false));
$image->filter(new Resize(300, 600)->aspectRatio(false)->upsize(false));
```
## License
This package is open-sourced software licensed under the [MIT License](LICENSE.md).