Changeset 38949 for trunk/src/wp-includes/class-wp-image-editor-imagick.php
- Timestamp:
- 10/26/2016 07:27:51 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-image-editor-imagick.php
r38015 r38949 74 74 'flipimage', 75 75 'flopimage', 76 'readimage', 76 77 ); 77 78 … … 145 146 146 147 try { 147 $this->image = new Imagick( $this->file ); 148 $this->image = new Imagick(); 149 $file_parts = pathinfo( $this->file ); 150 151 // By default, PDFs are rendered in a very low resolution. 152 // We want the thumbnail to be readable, so increase the rendering dpi. 153 if ( 'pdf' == strtolower( $file_parts['extension'] ) ) { 154 $this->image->setResolution( 128, 128 ); 155 } 156 157 // Reading image after Imagick instantiation because `setResolution` 158 // only applies correctly before the image is read. 159 $this->image->readImage( $this->file ); 148 160 149 161 if ( ! $this->image->valid() )
Note: See TracChangeset
for help on using the changeset viewer.