mirror of
https://github.com/devilbox/docker-php-fpm.git
synced 2025-12-10 11:01:14 +00:00
Added imagick PDF support (via ghostscript)
This commit is contained in:
BIN
tests/mods/modules/imagick/dummy.pdf
Normal file
BIN
tests/mods/modules/imagick/dummy.pdf
Normal file
Binary file not shown.
29
tests/mods/modules/imagick/imagick-pdf.php
Normal file
29
tests/mods/modules/imagick/imagick-pdf.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/**
|
||||
* This page should print 'OK' if everything works,
|
||||
* 'FAIL' or nothing if an error occured.
|
||||
*/
|
||||
ini_set('display_startup_errors', 1);
|
||||
ini_set('display_errors', 1);
|
||||
error_reporting(-1);
|
||||
|
||||
$PHP_VERSION = str_replace('-dev', '', PHP_VERSION);
|
||||
|
||||
// Only available since 5.3.0 (PHP 5.3 and 5.4 segfaults)
|
||||
if (version_compare($PHP_VERSION, '5.5.0', '<')) {
|
||||
echo 'SKIP';
|
||||
exit(0);
|
||||
}
|
||||
// FIXME: Currently not supported on PHP 8
|
||||
if (version_compare($PHP_VERSION, '8.0.0', '>=')) {
|
||||
echo 'SKIP';
|
||||
exit(0);
|
||||
}
|
||||
|
||||
$img = new Imagick();
|
||||
|
||||
if ($img->readImage('dummy.pdf') !== True) {
|
||||
echo 'FAIL: newImage()';
|
||||
exit(1);
|
||||
}
|
||||
echo 'OK';
|
||||
Reference in New Issue
Block a user