function colorize($color, $opacity)
{
$rgba = $this->normalize_color($color);
$alpha = $this->keep_within(127 - 127 * $opacity, 0, 127);
imagefilter($this->image, IMG_FILTER_COLORIZE, $this->keep_within($rgba['r'], 0, 255), $this->keep_within($rgba['g'], 0, 255), $this->keep_within($rgba['b'], 0, 255), $alpha);
return $this;
}