public function rotate($angle)
{
$this->setForceAlpha(true);
$this->addConvertOption('background', 'none')->addConvertOption('alpha', 'set')->addConvertOption('rotate', $angle);
//an image size has changed after the rotate action, it's required to save it and reinit resource
$this->saveIfRequired('after_rotate');
$this->resource = null;
$this->initResource();
return $this;
}