grafika icon indicating copy to clipboard operation
grafika copied to clipboard

Call to undefined method GdImage::getPixelIterator()

Open php4fan opened this issue 1 year ago • 1 comments

I have a Laravel application that uses Grafika and had been working for months if not years.

Without touching anything in my code, I installed the ImageMagick php extension and now I get this error:

Error:
Call to undefined method GdImage::getPixelIterator()

  at /srv/www/iframe.xxxx.com/vendor/kosinix/grafika/src/Grafika/Imagick/Filter/Dither.php:60
  at Grafika\Imagick\Filter\Dither->diffusion()
     (/srv/www/iframe.xxxx.com/vendor/kosinix/grafika/src/Grafika/Imagick/Filter/Dither.php:40)
  at Grafika\Imagick\Filter\Dither->apply()
     (/srv/www/iframe.xxxx.com/vendor/kosinix/grafika/src/Grafika/Imagick/Editor.php:38)
  at Grafika\Imagick\Editor->apply()
     (/srv/www/iframe.xxxx.com/app/IFrame/Application.php:132)

The mere act of adding the ImageMagick extension (without modifying my code to use it in any way) has made this error appear.

php4fan avatar Dec 03 '23 18:12 php4fan

And I can confirm that removing the ImageMagick extension "fixes" the issue.

php4fan avatar Dec 03 '23 18:12 php4fan