WordPress.org

Make WordPress Core

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

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

Good point, updated

  • wordpress/wp-includes/class-wp-image-editor-gd.php

     
    9797                if ( ! $size )
    9898                        return new WP_Error( 'invalid_image', __('Could not read image size.'), $this->file );
    9999
     100                if ( function_exists( 'imagealphablending' ) && function_exists( 'imagesavealpha' ) ) {
     101                        imagealphablending( $this->image, false );
     102                        imagesavealpha( $this->image, true );
     103                }
     104
    100105                $this->update_size( $size[0], $size[1] );
    101106                $this->mime_type = $size['mime'];
    102107