The Imagick function is used to create and modify images using the ImageMagick API. The ImageMagick is the software suite to create edit and modify the compose bitmap images. This functions read, write and converts images in many formats including DPX, EXR, GIF, JPEG, JPEG-2000, PDF, PhotoCD, PNG, Postscript, SVG, and TIFF.
Requirements: PHP 5.1.3 and ImageMagick 6.2.4 versions required to install ImageMagick.
The installation process of ImageMagick (Imagick) on Ubuntu: There are some steps to install ImageMagick and Imagick PHP extension on Ubuntu 16.04, 18.04 and above versions which are listed below:
- Install Apache Server: If apache server is not installed in your system then first install the apache2 server.
- Make Superuser: Open terminal and use following command to make yourself superuser.
sudo su
- Install Required Packages: Use the following command to Install the required packages of ImageMagick and Imagick PHP extension.
$ sudo apt install php php-common gcc
- Install ImageMagick extension: Now install the ImageMagick PHP extension by using the following command.
$ sudo apt install imagemagick
- Install Imagick extension: After completion of ImageMagick package, the Imagick PHP extension will install.
$ sudo apt install php-imagick
- Restart Apache Server: Restart the apache server by using the following command.
$ sudo systemctl restart apache2
- Verify the Imagick extension: The Imagick extension can be verified by using the following command.
$ php -m | grep imagick