bavix / glow-kit
This package is abandoned and no longer maintained.
No replacement package was suggested.
A set for working with an image
2.0.0
2020-08-31 15:16 UTC
Requires
- php: ^7.3
- intervention/image: ^2.5
Requires (Dev)
- infection/infection: ^0.16|^0.17
- phpunit/phpunit: ^9.3
This package is auto-updated.
Last update: 2023-11-29 03:14:49 UTC
README
glow-kit - A set for working with an image.
- Vendor: bavix
- Package: glow-kit
- Version:
- PHP Version: 7.3+
- Composer:
composer require bavix/glow-kit
Get started
The library implements simple algorithms for working with images.
- Scale Down
- Contain
- Cover
- Fit
Fit Image
use Intervention\Image\ImageManagerStatic; use Bavix\Glow\Adapters\Fit; $adapter = new Fit(ImageManagerStatic::getManager()); $image = ImageManagerStatic::make(__DIR__ . '/image.jpg'); $result = $adapter->apply($image, [ 'width' => '300', 'height' => '300', ]); $result->save(__DIR__ . '/output.jpg');
Contain Image
use Intervention\Image\ImageManagerStatic; use Bavix\Glow\Adapters\Contain; $adapter = new Contain(ImageManagerStatic::getManager()); $image = ImageManagerStatic::make(__DIR__ . '/image.jpg'); $result = $adapter->apply($image, [ 'width' => '300', 'height' => '300', ]); $result->save(__DIR__ . '/output.jpg');
Cover Image
use Intervention\Image\ImageManagerStatic; use Bavix\Glow\Adapters\Cover; $adapter = new Cover(ImageManagerStatic::getManager()); $image = ImageManagerStatic::make(__DIR__ . '/image.jpg'); $result = $adapter->apply($image, [ 'width' => '300', 'height' => '300', ]); $result->save(__DIR__ . '/output.jpg');
Supported by