docker-php-extension-installer/scripts/tests/imagick

22 lines
597 B
Plaintext
Raw Normal View History

#!/usr/bin/env php
<?php
require_once __DIR__ . '/_bootstrap.php';
$requiredFormats = array_map('strtoupper', [
'BMP',
'GIF',
'JPG',
'PNG',
'SVG',
'TIFF',
]);
$supportedFormats = array_map('strtoupper', Imagick::queryFormats());
$missingFormats = array_diff($requiredFormats, $supportedFormats);
if ($missingFormats !== []) {
sort($missingFormats);
fwrite(STDERR, "Imagick does NOT support these formats:\n- " . implode("\n- ", $missingFormats) . "\n");
exit(1);
}
echo "Imagick supports at least these formats:\n- ", implode("\n- ", $requiredFormats), "\n";