Exemple #1
0
 /**
  * Like grayscale, except you can specify the color.
  *
  * @param  mixed  $color Color in any format accepted by Normalize::color
  * @return Image
  */
 public function colorize($color)
 {
     $color = Normalize::color($color);
     imagefilter($this->image, IMG_FILTER_COLORIZE, $color['r'], $color['g'], $color['b'], $color['a']);
     return $this;
 }
 /**
  * @expectedException Elboletaire\Watimage\Exception\InvalidArgumentException
  */
 public function testColorFail()
 {
     Normalize::color('#33333');
 }