2020-12-03 18:01:45 +01:00
|
|
|
#!/usr/bin/env php
|
|
|
|
<?php
|
|
|
|
|
2021-09-28 12:27:17 +02:00
|
|
|
require_once __DIR__ . '/_bootstrap.php';
|
2020-12-03 18:01:45 +01:00
|
|
|
|
|
|
|
$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";
|