如何在GraphicsMagick .ai到.png转换中保持透明背景?

gap*_*lus 2 image-manipulation imagemagick graphicsmagick

我正在使用GraphicsMagick包进行图像处理

将Illustrator(.ai)文件转换为.png文件时,我最终失去透明度,因此背景最终变为白色.

我使用相同的选项并使用ImageMagick进行转换时没有这个问题,但是我需要一个解决方案来使它与GraphicsMagick一起使用.

emc*_*lle 6

我没有很多使用GraphicsMagick的经验,但我认为它的行为-backgroundImageMagick的行为相同:

gm convert -background transparent source.ai out.png
Run Code Online (Sandbox Code Playgroud)

注意:这可以通过读取矢量图形之前定义背景来实现