程序化图形工具链
我在 Inkscape 中绘制了一个图标,但现在想以编程方式更改它(稍微更改不同图标状态的颜色)并将其转换为包含多个不同颜色图标的平铺 PNG 格式文件。 我了解 Inkscape 的 --export-png 选项,但找不到一种方法可以使其更改图像和/或多次导出到组合图像的不同部分。
是否有任何好的面向用户的工具来以编程方式摆弄图像,或者我是否必须深入研究GD,甚至手动修改SVG XML?
I have drawn an icon in Inkscape, but would now like to programmatically alter it (change the colours slightly for different icon states) and convert it to a tiled PNG format file containing multiple icons with different colours. I know about Inkscape's --export-png options, but can't see a way to make it change the image and/or export multiple times to different parts of the combined image.
Are there any good user-oriented tools for programmatically fiddling with images, or do I have to delve into GD or even manually modifying the SVG XML?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尽管我不能 100% 确定它是否满足您面向用户的要求,但我建议您查看 www.imagemagick.org。 我已成功使用其“转换”实用程序来编写从 svg 到 png 的转换脚本,并添加自定义背景颜色。
Even though I'm not 100% sure if it fulfills your request for user-orientation, I recommend you to have a look at www.imagemagick.org. I have successfully used its "convert" utility for scripting conversion from svg to png and also for adding custom background colors.
我使用两套简单的工具来为网络漫画执行此操作:
注意:Inkscape 可以通过一些工作安装在网络服务器上,并且可以从 CGI(perl、php 等)调用,尽管它很慢(因此您应该缓存结果)。
从 SVG 文件目录上的命令行调用它:
您可能也感兴趣Batik 中,一个用 Java 编写的 SVG 渲染引擎。 它在服务器端运行良好,并且相当独立。
I use two simple sets of tools to do this for a webcomic:
Note: Inkscape can be installed on a webserver with a bit of work and can be called from a CGI (perl, php, etc.), though it's slow (so you should cache the results).
Calling it from the command line on a directory of SVG files:
You may also be interested in Batik, an SVG render engine written in Java. It runs nicely on the server side, and is fairly self-contained.