Problem

When the image is rotated the new image dimensions are not saved (in fact 2 notices are triggered).

This due accessing the wrong paramaters of the $image object:

    $new_file->image_dimensions['width'] = $image->width;
    $new_file->image_dimensions['height'] = $image->height;

Proposed resolution

Fix the access to the properties:

    $new_file->image_dimensions['width'] = $image->info['width'];
    $new_file->image_dimensions['height'] = $image->info['height'];
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

zero2one created an issue. See original summary.

zero2one’s picture

Status: Active » Needs review
FileSize
590 bytes

Created a patch to fix the wrongly accessed image dimensions.

Johan den Hollander’s picture

I confirm that #2 takes this errors away

However I still see 3 more errors when trying to rotate an image in my syslog similar to these described here:
https://www.drupal.org/node/2544678

These errors were present before patching with #2.

Johan den Hollander’s picture

Rotating works correctly on php 5.3 but on 5.6 it does not work.

This seems to be related: https://www.drupal.org/node/2215369