How to use imagemagick with tcpdf

I need to process images in TCPDF

I get this error .. Imagemagick is installed, but how do I tell TCPDF the path to imagemagick?

TCPDF ERROR: TCPDF requires the Imagick or GD extension to handle PNG images with alpha channel.
+5
source share
3 answers

Just try installing the missing GD extension before doing anything else.

PHP 5

sudo apt-get install php5-gd

PHP 7

sudo apt install php7.1-gd

And then restart Apache / NGINX

#Apcahe
sudo service apache2 restart
#NGINX
service nginx restart
+14
source

You need to enable the GD or ImageMagick extensions for PHP (either one or the other). If you choose ImageMagick, you need to make sure that you have the packages installed.

Edit the php.ini file to enable the extension. On Windows:

extension=php_imagick.dll

or

extension=php_gd2.dll

On Unix / Linux:

extension=imagick.so

, PHP, --with-gd php5-gd. ( - php54w-gd)

+3
sudo yum install php56-gd
sudo service httpd restart

CentOS.

+1

All Articles