diff --git a/wp-includes/class-wp-image-editor-gd.php b/wp-includes/class-wp-image-editor-gd.php index ddba1ff8bb..37598b2a5e 100644 --- a/wp-includes/class-wp-image-editor-gd.php +++ b/wp-includes/class-wp-image-editor-gd.php @@ -306,9 +306,12 @@ class WP_Image_Editor_GD extends WP_Image_Editor { */ public function rotate( $angle ) { if ( function_exists('imagerotate') ) { - $rotated = imagerotate( $this->image, $angle, 0 ); + $transparency = imagecolorallocatealpha( $this->image, 255, 255, 255, 127 ); + $rotated = imagerotate( $this->image, $angle, $transparency ); if ( is_resource( $rotated ) ) { + imagealphablending( $rotated, true ); + imagesavealpha( $rotated, true ); imagedestroy( $this->image ); $this->image = $rotated; $this->update_size(); diff --git a/wp-includes/version.php b/wp-includes/version.php index e6acd1f799..3158597e09 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.2-alpha-31039'; +$wp_version = '4.2-alpha-31040'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.