Changeset 47122 for trunk/src/wp-includes/class-wp-image-editor-gd.php
- Timestamp:
- 01/29/2020 12:43:23 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-image-editor-gd.php
r46696 r47122 24 24 public function __destruct() { 25 25 if ( $this->image ) { 26 // we don't need the original in memory anymore26 // We don't need the original in memory anymore. 27 27 imagedestroy( $this->image ); 28 28 } … … 42 42 } 43 43 44 // On some setups GD library does not provide imagerotate() - Ticket #11536 44 // On some setups GD library does not provide imagerotate() - Ticket #11536. 45 45 if ( isset( $args['methods'] ) && 46 46 in_array( 'rotate', $args['methods'], true ) && … … 308 308 */ 309 309 public function crop( $src_x, $src_y, $src_w, $src_h, $dst_w = null, $dst_h = null, $src_abs = false ) { 310 // If destination width/height isn't specified, use same as311 // width/height from source.310 // If destination width/height isn't specified, 311 // use same as width/height from source. 312 312 if ( ! $dst_w ) { 313 313 $dst_w = $src_w; … … 433 433 } 434 434 } elseif ( 'image/png' === $mime_type ) { 435 // convert from full colors to index colors, like original PNG.435 // Convert from full colors to index colors, like original PNG. 436 436 if ( function_exists( 'imageistruecolor' ) && ! imageistruecolor( $image ) ) { 437 437 imagetruecolortopalette( $image, false, imagecolorstotal( $image ) ); … … 449 449 } 450 450 451 // Set correct file permissions 451 // Set correct file permissions. 452 452 $stat = stat( dirname( $filename ) ); 453 $perms = $stat['mode'] & 0000666; // same permissions as parent folder, strip off the executable bits453 $perms = $stat['mode'] & 0000666; // Same permissions as parent folder, strip off the executable bits. 454 454 chmod( $filename, $perms ); 455 455
Note: See TracChangeset
for help on using the changeset viewer.