WordPress.org

Make WordPress Core

Ticket #37140: 37140.patch

File 37140.patch, 656 bytes (added by triplejumper12, 3 years ago)

Patch to remove the orientation of the image after rotation

  • src/wp-includes/class-wp-image-editor-imagick.php

     
    540540                 */
    541541                try {
    542542                        $this->image->rotateImage( new ImagickPixel('none'), 360-$angle );
     543                       
     544                        // We need to adjust the EXIF information for the image orientation since we just rotated it.
     545                        $this->image->setImageOrientation(Imagick::ORIENTATION_UNDEFINED);
    543546
    544547                        // Since this changes the dimensions of the image, update the size.
    545548                        $result = $this->update_size();