Ticket #23039: wp-image-editor-gd.diff

File wp-image-editor-gd.diff, 669 bytes (added by joehoyle, 5 months ago)

Good point, updated

Line 
1Index: wordpress/wp-includes/class-wp-image-editor-gd.php
2===================================================================
3--- wordpress/wp-includes/class-wp-image-editor-gd.php  (revision 23193)
4+++ wordpress/wp-includes/class-wp-image-editor-gd.php  (working copy)
5@@ -97,6 +97,11 @@
6                if ( ! $size )
7                        return new WP_Error( 'invalid_image', __('Could not read image size.'), $this->file );
8 
9+               if ( function_exists( 'imagealphablending' ) && function_exists( 'imagesavealpha' ) ) {
10+                       imagealphablending( $this->image, false );
11+                       imagesavealpha( $this->image, true );
12+               }
13+
14                $this->update_size( $size[0], $size[1] );
15                $this->mime_type = $size['mime'];
16