Problem/Motivation
When using a text overlay image operation the following exception is thrown:
TypeError: Drupal\image_effects\Plugin\ImageToolkit\Operation\gd\TextOverlay::imagettftextWrapper(): Argument #4 ($x) must be of type int, float given, called in /var/www/web/modules/contrib/image_effects/src/Plugin/ImageToolkit/Operation/gd/TextOverlay.php on line 91
Steps to reproduce
* Install image_effects 4.0.0
* Create an image style that uses a text overlay effect
* Make sure text alignment is set to center
* Test the preview of the text overlay effect
Proposed resolution
Because the method parameters are typed they expect int coordinates. When centering image text however a round function is applied to the x_offset, casting it to a double.
Issue fork image_effects-3504514
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
klaasvw commentedLooks like it is already fixed in https://www.drupal.org/project/image_effects/issues/3494550