Warning: imagesx() expects parameter 1 to be resource, boolean given in image_gd_rotate() (line 163 of /var/app/current/betazostreet/modules/system/image.gd.inc). I activated the module autorotate only (that's the only i've got to use as my user will upload content using their phone) and I have the following error - I've tried to search around and could not find an answer or similar issue so I post it here in the hope someone will help ! Original report by all and thanks in advance for your help ! :) Remaining tasksĪs of comment #53, we are in need of a few backports from d8 User interface changes When displaying the front page, you get a Warning: imagecolorsforindex(): Color index -1 out of range in Drupal\system\Plugin\ImageToolkit\Operation\gd\Rotate->execute() (line 73 of core/modules/system/src/Plugin/ImageToolkit/Operation/gd/Rotate.php).Ī "follow-up" is already in the make in issue #1551686: Image rotate dimensions callback can calculate new dimensions for every angle that should solve the 3rd error in a better way.
The gif should not hav a transparent color set. Create an article, and upload a gif file in the image field.the teaser display of the article content type Associate the new style to an image field formatter, e.g.Create an image style with a single rotate effect: leave the background color field empty to require transparent color, set angle to any degree.The rotate operation now checks for this and converts them to their positive equivalents. Yet another error was discovered in PHP 5.5: rotate does not handle the negative rotation angles -90, -180 and -270 as special cases that can be done fast and without any loss. So, the tests had to be adapted as well and can now nicely differentiate between transparent pixels added by rotate and those that were already in the original image.Īn error was discovered in PHP 5.5: the rotated image may be 1 pixel smaller in both dimensions than in PHP 5.4. However, tests in ToolkitGdTest check for rgba(0, 0, 0, 127) (fully transparent black) because that is what is stored in the test png. I decided to use fully transparent white as transparent color where possible. Solving this (locally) uncovered another error: fully opaque white is defined as the transparent color for the image, even for images that support transparency natively (= png). This uncovered an error in the GD rotate image operation: the GD imagecolortransparent() function returns -1 for images that do not already have a transparent color, while the checks are on 0. In PHP 5.5, the GD imagerotate() function seems to be more strict in accepting background color indices. Comments already indicated that it might be a problem with PHP 5.5 compatibility in core. The original issue was already posted a while ago, but in the contrib imagecache_actions issue queue.