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.
- 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
- How to Install php-curl in Ubuntu ?
- How to install Apache server in Ubuntu ?
- How to Install and Configure MongoDB in Ubuntu?
- How to enable PHP's openssl extension to install Composer ?
- Why to use .html instead of .htm extension?
- How to remove extension from string in PHP?
- How to remove .html extension from URL of a static page ?
- Creating custom domain name instead of localhost in Ubuntu
- LAMP installation and important PHP configurations on Ubuntu
- How to install XAMPP on Windows ?
- How to install the previous version of node.js and npm ?
- PHP | Imagick getImageDelay() Function
- PHP | Imagick setImageGravity() Function
- PHP | Imagick getImageRedPrimary() Function
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.