Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Rundiz/Image
tests
.gitattributes
LICENSE
README.md
composer.json
phpunit.xml

README.md

Image manipulation

Image manipulation use GD or Imagick as drivers. It support watermark image or text, resize, crop, rotate, transparency gif or png and also support animation gif (Imagick only).

Latest Stable Version License Total Downloads

Example

Gd driver

$Image = new \Rundiz\Image\Drivers\Gd('/path/to/source-image.jpg');
$Image->resize(900, 600);
$Image->save('/path/to/new-file-name.jpg');

Imagick driver

$Image = new \Rundiz\Image\Drivers\Imagick('/path/to/source-image.jpg');
$Image->resize(900, 600);
$Image->save('/path/to/new-file-name.jpg');

Fallback drivers

You can use multiple drivers as fallback if it does not support.

if (extension_loaded('imagick') === true) {
    $Image = new \Rundiz\Image\Drivers\Imagick('/path/to/source-image.jpg');
} else {
    $Image = new \Rundiz\Image\Drivers\Gd('/path/to/source-image.jpg');
}
$Image->rotate('hor');
$Image->crop(500, 500, 'center', 'middle');
$Image->save('/path/to/new-file-name.jpg');

For more details, please look in tests folder