Image::rotate PHP Method

rotate() public method

public rotate ( $degree, $color = 'FFFFFF' )
    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);
    }

Usage Example

Example #1
0
 public function rotate($degrees)
 {
     $image = new Image($this->get_image_path());
     $image->rotate($degrees);
     $image->save($this->get_image_path());
     $this->generate_thumb();
 }
All Usage Examples Of Image::rotate