1 <?php
 2 
 3 /**
 4  * @package redaxo\media-manager
 5  */
 6 class rex_effect_filter_sepia extends rex_effect_abstract
 7 {
 8     public function execute()
 9     {
10         $this->media->asImage();
11         $img = $this->media->getImage();
12         imagefilter($img, IMG_FILTER_GRAYSCALE);
13         imagefilter($img, IMG_FILTER_BRIGHTNESS, -30);
14         imagefilter($img, IMG_FILTER_COLORIZE, 90, 55, 30);
15         $this->keepTransparent($img);
16         $this->media->setImage($img);
17     }
18 
19     public function getName()
20     {
21         return rex_i18n::msg('media_manager_effect_sepia');
22     }
23 
24     public function getParams()
25     {
26         return [
27         ];
28     }
29 }
30