Решение оказалось в замене PNG8 на PNG и добавление -colors 256
При этом размер миниатюры получается чуть больше, но зато работает.
Код: Выделить всё
/**
* Create PDF Thumbnail
*/
function create_thumbnail_pdf($source, $destination, $mimetype)
{
global $config;
// Only use imagemagick if defined and the passthru function not disabled
if ($config['img_imagick'] && function_exists('passthru'))
{
@passthru(
escapeshellcmd($config['img_imagick']) . 'convert'
. ((defined('PHP_OS') && preg_match('#^win#i', PHP_OS)) ? '.exe' : '')
. ' -verbose -quality 85 -colorspace rgb -colors 256 -antialias -thumbnail x120 -strip PDF:"' . str_replace('\\', '/', $source) . '[0]"'
. ' PNG:"' . str_replace('\\', '/', $destination) . '"'
);
if (file_exists($destination))
{
return true;
}
}
return false;
} 
