Changeset 58456 for trunk/src/wp-admin/includes/image-edit.php
- Timestamp:
- 06/21/2024 07:49:19 PM (3 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/image-edit.php
r58214 r58456 736 736 $h = $size['height']; 737 737 738 $scale = 1 / _image_get_preview_ratio( $w, $h ); // Discard preview scaling.738 $scale = isset( $sel->r ) ? $sel->r : 1 / _image_get_preview_ratio( $w, $h ); // Discard preview scaling. 739 739 $image->crop( $sel->x * $scale, $sel->y * $scale, $sel->w * $scale, $sel->h * $scale ); 740 740 } else { 741 $scale = 1 / _image_get_preview_ratio( imagesx( $image ), imagesy( $image ) ); // Discard preview scaling.741 $scale = isset( $sel->r ) ? $sel->r : 1 / _image_get_preview_ratio( imagesx( $image ), imagesy( $image ) ); // Discard preview scaling. 742 742 $image = _crop_image_resource( $image, $sel->x * $scale, $sel->y * $scale, $sel->w * $scale, $sel->h * $scale ); 743 743 }
Note: See TracChangeset
for help on using the changeset viewer.