Ticket #60798: 60798.patch
File 60798.patch, 872 bytes (added by , 4 months ago) |
---|
-
src/wp-includes/class-wp-image-editor-imagick.php
775 775 * @since 6.4.0 776 776 */ 777 777 protected function remove_pdf_alpha_channel() { 778 $version = Imagick::getVersion(); 779 // Remove alpha channel if possible to avoid black backgrounds for Ghostscript >= 9.14. RemoveAlphaChannel added in ImageMagick 6.7.5. 780 if ( $version['versionNumber'] >= 0x675 ) { 778 if ( version_compare( phpversion( 'imagick' ), '9.14', '>=' ) ) { 781 779 try { 782 780 // Imagick::ALPHACHANNEL_REMOVE mapped to RemoveAlphaChannel in PHP imagick 3.2.0b2. 783 781 $this->image->setImageAlphaChannel( defined( 'Imagick::ALPHACHANNEL_REMOVE' ) ? Imagick::ALPHACHANNEL_REMOVE : 12 );