如何解决使用 ImageMagick 生成多层 PSD
我正在寻找一种方法将完全在 imagemagick 中生成的图像转换为 psd,图像中的所有“元素”都位于单独的图层上。
我当前的命令如下所示:
convert -size "300x200"
( xc:none -background "#ff0000" )
( xc:none -gravity "SouthEast" -pointsize "20" -fill "#f486d8" -draw "text 9,9 'This is a Test'" -mosaic )
( xc:none -gravity "SouthWest" -pointsize "12" -fill "#f486d8" -draw "text 9,9 'Magni natus veniam.'" )
-layers merge test.psd
但它返回一个损坏的PSD。添加 -layers merge
将返回一个有效的 PSD,但(显然)只有一层。
获得多个图层我做错了什么?
解决方法
这是您在 ImageMagick 中命令的 Unix 语法。它似乎对我有用。这是你想要的吗?
convert -size "300x200" -background "#ff0000" \
\( xc:none \) \
\( xc:none -gravity "SouthEast" -pointsize "20" -fill "#f486d8" -draw "text 9,9 'This is a Test'" \) \
\( xc:none -gravity "SouthWest" -pointsize "12" -fill "#f486d8" -draw "text 9,9 'Magni natus veniam.'" \) \
\( -clone 0-2 -layers merge \) \
-reverse test.psd
这是 Windows 等效项。
convert -size "300x200" -background "#ff0000" ^
( xc:none ) ^
( xc:none -gravity "SouthEast" -pointsize "20" -fill "#f486d8" -draw "text 9,9 'This is a Test'" ) ^
( xc:none -gravity "SouthWest" -pointsize "12" -fill "#f486d8" -draw "text 9,9 'Magni natus veniam.'" ) ^
( -clone 0-2 -layers merge ) ^
-reverse test.psd
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。