First Steps
suggest changeInstallation
Using apt on Debian based systems
sudo apt-get install php-imagick
Using Homebrew on macOS
brew install imagemagick
That installs the ImageMagick library, not the PHP extension. Install the extension separately, for example with pecl install imagick, after the library is present. Package names on Linux vary; older Debian packages were named php5-imagick.
To see the dependencies installed using the brew method, visit brewformulas.org/Imagemagick.
Using binary releases
Instructions on imagemagick website.
Usage
<?php
$imagen = new Imagick('imagen.jpg');
$imagen->thumbnailImage(100, 0);
// A zero height keeps the aspect ratio for thumbnailImage().
echo $imagen; // __toString() returns the image bytes, not a description.
?>
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents