public function rotate($degree, $color = 'FFFFFF')
{
$rgb = $this->html2rgb($color);
$this->image = imagerotate($this->image, $degree, imagecolorallocate($this->image, $rgb[0], $rgb[1], $rgb[2]));
$this->width = imagesx($this->image);
$this->height = imagesy($this->image);
}