mirror of
https://github.com/danog/docker-php-extension-installer.git
synced 2024-12-13 09:57:27 +01:00
22 lines
597 B
PHP
Executable File
22 lines
597 B
PHP
Executable File
#!/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";
|