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'];
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | image_dimensions_are_not_saved_correct_2563665-2.patch | 590 bytes | zero2one |
Comments
Comment #2
zero2one commentedCreated a patch to fix the wrongly accessed image dimensions.
Comment #3
johan den hollander commentedI 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.
Comment #4
johan den hollander commentedRotating 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