Php webp图像显示黑色背景,而不是透明度

Php webp图像显示黑色背景,而不是透明度,php,Php,当上传png图像并使用rosselldk插件转换为webp图像时。表示它显示黑色背景,而不是透明背景 $success = WebPConvert\WebPConvert::convert($pathToImages, $pathToWebpImages, [ // It is not required that you set any options - all have sensible defaults. // We set some, fo

当上传
png
图像并使用
rosselldk插件
转换为
webp
图像时。表示它显示黑色背景,而不是透明背景

$success = WebPConvert\WebPConvert::convert($pathToImages, $pathToWebpImages, [
            // It is not required that you set any options - all have sensible defaults.
            // We set some, for the sake of the example.
            'quality' => 'auto',
            'max-quality' => 90,
            'converters' =>  [ 'gd', 'imagick', 'wpc', 'ewww']/*,
            'skip-pngs'=>"0"*/
            //'converters' => ['cwebp','webp', 'gd', 'imagick', 'wpc', 'ewww'],  
            // Specify conversion methods to use, and their order
        ]);

我做了大量的研究和测试,不幸的是,在旧Gd上为webp保留alpha通道似乎失去了所有希望

你能告诉我Gd和PHP的版本吗?它可以在转换日志中找到。或者简单地运行以下命令:


我做了大量的研究和测试,不幸的是,在旧Gd上为webp保留alpha通道似乎失去了所有希望

你能告诉我Gd和PHP的版本吗?它可以在转换日志中找到。或者简单地运行以下命令:


旧的Gd版本不处理透明度。更多信息:

旧的Gd版本不处理透明度。更多信息: