CodeSleeve/stapler — pull request #42 by vinicius73 (2014-02-26 21:36:40+00:00)
Title: Before Styles Function

Function to be performed on the image before resizing it.
Very useful to put watermark on all images before resizes them.

```php
'pre_styles' => function ($file, $imagine) {

$watermark = $imagine->open(
base_path('wartermarker/acn.png')
);
$image = $imagine->open($file->getRealPath());
$size = $image->getSize();
$watermarkSize = $watermark->getSize();
$bottomRight = new Imagine\Image\Point($size->getWidth() - $watermarkSize->getWidth(), $size->getHeight() - $watermarkSize->getHeight());

$image->paste($watermark, $bottomRight);

return $image;
},
```
---
Sorry if my choice is not very good.
I had the need and the idea and decided to implement.
Lay the layout of the community as to whether this is a useful or viable option.