1
0
mirror of https://github.com/Intervention/image.git synced 2025-08-30 09:10:21 +02:00

added code example

This commit is contained in:
Oliver Vogel
2013-02-01 12:31:54 +01:00
parent d3c89af7ce
commit 5149e8dbe3

View File

@@ -50,3 +50,24 @@ Add the facade of this package to the `$aliases` array.
* Image::greyscale - Turn current image into a greyscale version
* Image::reset - Reset to original image resource
* Image::save - Save image in filesystem
### Code example (Laravel)
```php
// create Image from file
$img = Image::make('public/foo.jpg');
// resize image
$img->resize(300, 200);
// turn image into greyscale version
$img->greyscale();
// save image in desired format
$img->save('public/bar.jpg');
// its also possible to chain methods
$img1 = Image::make('public/img1.png');
$img2 = Image::make('public/img2.png');
$img1->grab(200)->insert($over)->save('public/bar.jpg');
```