Make WordPress Core

Ticket #30596: class-wp-image-editor-gd.php.2.patch

File class-wp-image-editor-gd.php.2.patch, 730 bytes (added by frankpw, 9 years ago)

Formatting correction to previous patch

  • class-wp-image-editor-gd.php

     
    306306         */
    307307        public function rotate( $angle ) {
    308308                if ( function_exists('imagerotate') ) {
    309                         $rotated = imagerotate( $this->image, $angle, 0 );
     309                        $transparency = imagecolorallocatealpha( $this->image, 255, 255, 255, 127 );
     310                        $rotated = imagerotate( $this->image, $angle, $transparency );
    310311
    311312                        if ( is_resource( $rotated ) ) {
     313                                imagealphablending( $rotated, true );
     314                                imagesavealpha( $rotated, true );
    312315                                imagedestroy( $this->image );
    313316                                $this->image = $rotated;
    314317                                $this->update_size();