descriptionMirror of 'php pecl imagick'
last changeTue, 12 May 2020 11:57:48 +0000 (12:57 +0100)
2020-05-12 Mikko KoppanenMinor update to master
2020-01-22 Alexander MenkClarify Versions
2019-05-21 DanackUpdate check_methods to get the latest methods from...
2019-05-21 DanackRemove old package maintainers.
2019-05-02 DanackRevert author changes as pecl upload didn't accept... 3.4.4
2019-05-02 DanackCorrect date in package.xml
2019-05-02 DanackMerge branch 'testing_ALPHACHANNEL_REMOVE'
2019-04-30 DanackCorrect version check for FlattenAlphaChannel and Remov... testing_ALPHACHANNEL_REMOVE
2019-04-17 DanackUpdate changelog
2019-04-17 DanackUpdate package to be beta stability for RC2 release.
2019-04-17 Remi ColletFix IMAGICK_EXTNUM
2019-04-16 DanackUse PHP_INT_MAX as start value to avoid overflowing...
2019-04-16 DanackRelax testing to allow test to work on 32bit systems.
2019-04-16 Remi Colletadd cleanup section to avoid result files
2019-04-16 Remi Colletadd missing file for tests
2019-04-16 Remi Colletfix NTS build
14 months ago 3.4.4
14 months ago 3.4.4RC2
14 months ago 3.4.4RC1
3 years ago 3.4.3
3 years ago 3.4.3RC4
3 years ago 3.4.3RC3
3 years ago 3.4.3RC2
4 years ago 3.4.2
4 years ago 3.4.3RC1
4 years ago 3.3.0
5 years ago 3.3.0RC2
5 years ago 3.3.0RC1
6 years ago 3.2.0RC1
6 years ago 3.2.0b2
6 years ago 3.2.0b1
6 years ago 3.1.2
7 weeks ago master
7 weeks ago minor-fix-url
11 months ago libgomp_segfault
14 months ago testing_ALPHACHANNEL_REMOVE
15 months ago bugfix_77791
19 months ago cflag_tweaking
19 months ago dev
2 years ago fix_for_travis_ci_php_53
2 years ago merge_fix_for_243
2 years ago merge_fix-145_imagickkernel_coverage
2 years ago travis_segfault_2017_09_10
3 years ago feature-method-optimizeimagetransparency
3 years ago pixeliterator_gc
3 years ago investigatingBugReports
4 years ago kernelInfoNull
4 years ago adding_methods_2016_03

Build Status


Imagick is a PHP extension to create and modify images using the ImageMagick library. There is also a version of Imagick available for HHVM. Although the two extensions are mostly compatible in their API, and they both call the ImageMagick library, the two extensions are completely separate code-bases.

PHP Imagick

Bugs can also be reported at but may have a slower response time.

HHVM Imagick

Installing on Windows

For Windows please install both Imagick and the underlying ImageMagick library from: * *

Once compiled, Imagick should be run with the same version of ImageMagick that it was compiled against. Running against a different version of ImageMagick is known to cause stability issues, and so is not recommended or supported.


Almost all of the functions in the library have an example at, where you can see the example code to call the function, as well as the generated image or output.


ImageMagick, the library that the Imagick extension exposes to PHP has had many bug fixes, that have fixed many image corruption issues. We strongly recommend upgrading to the latest version (greater than 6.9.1 or 7.x) if at all possible.


The PHP extension Imagick works by calling the ImageMagick library. Although the ImageMagick developers take good care in avoiding bugs it is inevitable that some bugs will be present in the code. ImageMagick also uses a lot of third party libraries to open, read and manipulate files. The writers of these libraries also take care when writing their code. However everyone makes mistakes and there will inevitably be some bugs present.

Because ImageMagick is used to process images it is feasibly possible for hackers to create images that contain invalid data to attempt to exploit these bugs. Because of this we recommend the following:

1) Do not run Imagick in a server that is directly accessible from outside your network. It is better to either use it as a background task using something like SupervisorD or to run it in a separate server that is not directly accessible on the internet.

Doing this will make it more difficult for hackers to exploit a bug, if one should exist in the libraries that ImageMagick is using.

2) Run it as a very low privileged process. As much as possible the files and system resources accessible to the PHP script that Imagick is being called from should be locked down.

3) Verify that all image files begin with the expected "magic bytes" corresponding to the image file types you support before sending them to ImageMagick for processing. This an be be done with finfo_file() - see below.

4) Check the result of the image processing is a valid image file before displaying it to the user. In the extremely unlikely event that a hacker is able to pipe arbitrary files to the output of Imagick, checking that it is an image file, and not the source code of your application that is being sent, is a sensible precaution. This can be accomplished by the following code: