Changeset 56178 for trunk/src/wp-includes/class-wp-image-editor-imagick.php
- Timestamp:
- 07/09/2023 09:23:34 PM (21 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-image-editor-imagick.php
r55404 r56178 103 103 } 104 104 105 // setIteratorIndex is optional unless mime is an animated format. 106 // Here, we just say no if you are missing it and aren't loading a jpeg. 105 /* 106 * setIteratorIndex is optional unless mime is an animated format. 107 * Here, we just say no if you are missing it and aren't loading a jpeg. 108 */ 107 109 if ( ! method_exists( 'Imagick', 'setIteratorIndex' ) && 'image/jpeg' !== $mime_type ) { 108 110 return false; … … 603 605 604 606 if ( $dst_w || $dst_h ) { 605 // If destination width/height isn't specified, 606 // use same as width/height from source. 607 /* 608 * If destination width/height isn't specified, 609 * use same as width/height from source. 610 */ 607 611 if ( ! $dst_w ) { 608 612 $dst_w = $src_w; … … 958 962 protected function pdf_setup() { 959 963 try { 960 // By default, PDFs are rendered in a very low resolution. 961 // We want the thumbnail to be readable, so increase the rendering DPI. 964 /* 965 * By default, PDFs are rendered in a very low resolution. 966 * We want the thumbnail to be readable, so increase the rendering DPI. 967 */ 962 968 $this->image->setResolution( 128, 128 ); 963 969 … … 987 993 988 994 try { 989 // When generating thumbnails from cropped PDF pages, Imagemagick uses the uncropped 990 // area (resulting in unnecessary whitespace) unless the following option is set. 995 /* 996 * When generating thumbnails from cropped PDF pages, Imagemagick uses the uncropped 997 * area (resulting in unnecessary whitespace) unless the following option is set. 998 */ 991 999 $this->image->setOption( 'pdf:use-cropbox', true ); 992 1000 993 // Reading image after Imagick instantiation because `setResolution` 994 // only applies correctly before the image is read. 1001 /* 1002 * Reading image after Imagick instantiation because `setResolution` 1003 * only applies correctly before the image is read. 1004 */ 995 1005 $this->image->readImage( $filename ); 996 1006 } catch ( Exception $e ) {
Note: See TracChangeset
for help on using the changeset viewer.