小编jef*_*ill的帖子

将 png 转换为 webp 不保留透明度

使用 Googlecwebp实用程序 ( https://developers.google.com/speed/webp/docs/cwebp ) 和 ImageMagickconvert实用程序,我无法在转换为 webp 时保留 png 图像的透明度。

使用convert我尝试使用 alpha-compression=0 和 alpha-quality=100,但没有积极的结果。请参阅: https: //imagemagick.org/script/webp.php

我正在处理的图像具有透明的角,用于圆形图标图像。

正在使用的脚本(在 Fish shell 中):

for file in *.png;
  cwebp $file -o (basename $file .png).webp;
end;
Run Code Online (Sandbox Code Playgroud)

for file in *.png;
  convert $file (basename $file .png).webp;
end;
Run Code Online (Sandbox Code Playgroud)

transparency imagemagick webp

2
推荐指数
1
解决办法
9956
查看次数

标签 统计

imagemagick ×1

transparency ×1

webp ×1