Make WordPress Core

Changeset 25636


Ignore:
Timestamp:
09/28/2013 06:36:17 AM (11 years ago)
Author:
nacin
Message:

Fix non-square rotations when using the Imagick image editor.

props DH-Shredder.
fixes #22663.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-image-editor-imagick.php

    r24766 r25636  
    353353        try {
    354354            $this->image->rotateImage( new ImagickPixel('none'), 360-$angle );
     355
     356            // Since this changes the dimensions of the image, update the size.
     357            $result = $this->update_size();
     358            if ( is_wp_error( $result ) )
     359                return $result;
     360
     361            $this->image->setImagePage( $this->size['width'], $this->size['height'], 0, 0 );
    355362        }
    356363        catch ( Exception $e ) {
    357364            return new WP_Error( 'image_rotate_error', $e->getMessage() );
    358365        }
    359         return $this->update_size();
     366        return true;
    360367    }
    361368
Note: See TracChangeset for help on using the changeset viewer.