bavix / glow-kit
A set for working with an image
Installs: 24
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 3
Forks: 0
Open Issues: 0
pkg:composer/bavix/glow-kit
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
