descriptionMirror of 'php pecl imagick'
ownermkoppanen
last changeTue, 21 May 2019 16:06:47 +0000 (17:06 +0100)
readme
shortlog
2019-05-21 DanackUpdate check_methods to get the latest methods from... master
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
2019-04-15 DanackReverting author changes as pecl is angry. 3.4.4RC1
2019-04-15 DanackUpdated release notes.
...
tags
4 months ago 3.4.4
4 months ago 3.4.4RC2
5 months ago 3.4.4RC1
2 years ago 3.4.3
2 years ago 3.4.3RC4
2 years ago 3.4.3RC3
2 years ago 3.4.3RC2
3 years ago 3.4.2
3 years ago 3.4.3RC1
3 years ago 3.3.0
4 years ago 3.3.0RC2
4 years ago 3.3.0RC1
5 years ago 3.2.0RC1
5 years ago 3.2.0b2
5 years ago 3.2.0b1
5 years ago 3.1.2
...
heads
6 weeks ago libgomp_segfault
3 months ago master
4 months ago testing_ALPHACHANNEL_REMOVE
5 months ago bugfix_77791
9 months ago cflag_tweaking
9 months ago dev
16 months ago fix_for_travis_ci_php_53
16 months ago merge_fix_for_243
16 months ago merge_fix-145_imagickkernel_coverage
2 years ago travis_segfault_2017_09_10
2 years ago feature-method-optimizeimagetransparency
2 years ago pixeliterator_gc
2 years ago investigatingBugReports
3 years ago kernelInfoNull
3 years ago adding_methods_2016_03
3 years ago m4_refactoring
...
 
top

Build Status

Imagick

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 https://bugs.php.net but may have a slower response time.

HHVM Imagick

Installing on Windows

For Windows please install both Imagick and the underlying ImageMagick library from: * http://windows.php.net/downloads/pecl/releases/imagick/ * http://windows.php.net/downloads/pecl/deps/

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.

Examples

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

ImageMagick

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 (currently 6.9.1) if at all possible.

Security

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:

```php

top