Make WordPress Core


Ignore:
Timestamp:
12/18/2009 09:53:46 AM (17 years ago)
Author:
azaozz
Message:

Fix the scale image check in image editor, fixes #11473 for 2.9

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.9/wp-admin/includes/image-edit.php

    r12281 r12447  
    510510
    511511                // check if it has roughly the same w / h ratio
    512                 if ( round($sX / $sY, 2) == round($fwidth / $fheight, 2) ) {
     512                $diff = round($sX / $sY, 2) - round($fwidth / $fheight, 2);
     513                if ( -0.1 < $diff && $diff < 0.1 ) {
    513514                        // scale the full size image
    514515                        $dst = wp_imagecreatetruecolor($fwidth, $fheight);
Note: See TracChangeset for help on using the changeset viewer.