pionix-labs/glu-image is a Laravel package for laravel 5 support for glu-image package.
It currently has 0 GitHub stars and 6.044 downloads on Packagist (latest version 0.1.6).
Install it with composer require pionix-labs/glu-image.
Discover more Laravel packages by pionix-labs
or browse all Laravel packages to compare alternatives.
Last updated
pionix-labs\glu-image is a PHP image manipulation helper library.
The package includes ServiceProvider and Facade for easy Laravel 4+ integration.
Note: This package forked and updated for laravel 5 upgrade because of main package is not maintaining anymore!
The package uses:
composer require pionix-labs/glu-image
Add Intervention\Image and PionixLabs\GluImage service providers in app/config/app.php.
'providers' => array(
// ...
'Intervention\Image\ImageServiceProvider',
'PionixLabs\GluImage\GluImageServiceProvider',
),
Add GluImage alias in app/config/app.php.
'aliases' => array(
// ...
'GluImage' => 'PionixLabs\GluImage\Facades\GluImage',
),
If you want to use Intervention\Image package directly, add InterImage alias in app/config/app.php.
This is not a necessary step for using GluImage.
'aliases' => array(
// ...
'InterImage' => 'Intervention\Image\Facades\Image',
),
$img = GluImage::get( $path_to_images.'/01.jpg' );
$img->resize(540,360);
$img->save( $path_to_images.'/01-resized.jpg' );
// ...
GluImage::get( $path_to_images.'/01.jpg' )->resize(540,360)->save( $path_to_images.'/01-resized.jpg' );
// ...
GluImage::get( $path_to_images.'/01.jpg' )->crop(540,360)->save( $path_to_images.'/01-cropped.jpg' );
// ...
// one chain creates two different files
GluImage::get( $path_to_images.'/01.jpg' )
->resize(540,360)
->save( $path_to_images.'/01-resized1.jpg' )
->resize(360,220)
->save( $path_to_images.'/01-resized2.jpg' );
// ...
// chaining another methods after save() method for animated gif files
// is available only with forked version of GifCreator
GluImage::get( $path_to_images.'/01.gif' )
->resize(540,360)
->save( $path_to_images.'/01-resized.gif' )
->crop(360,220)
->save( $path_to_images.'/01-resized-and-cropped.gif' );
GluImage is licensed under the MIT License.
Copyright 2014 Lukasz Gaszyna