WordPress.org

Make WordPress Core

Changeset 12446


Ignore:
Timestamp:
12/18/09 09:52:32 (4 years ago)
Author:
azaozz
Message:

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

File:
1 edited

Legend:

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

    r12281 r12446  
    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.