优化命令行 GIMP
我正在从命令行使用 GIMP 运行 script-fu 宏。然而,它的启动和运行速度相当慢——大约20-25秒。我认为大部分时间都花在启动上 - 加载所有插件等。有哪些方法可以在 CL 上优化 GIMP?有什么办法让它一直运行吗?
I am running a script-fu macro using GIMP from the command line. However, it is quite slow to startup and run - about 20-25 seconds. I think a lot of this time is spent on startup - loading all the plugins and such. What are some ways to optimize GIMP on the CL? Is there any way to keep it always running?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
GIMP 文档 中的一些有前途的选项(其中一些您可能已经正在使用):
GIMP 常见问题解答:
这个关于超级用户的问题解决了一般情况下 GIMP 启动时间慢的问题,并建议:
C:\Documents and Settings\<用户名>\.fonts-cache1
然后打开 GIMP。--verbose
启动并查看其挂起的位置来检查加载缓慢的插件。然后通过在C:\Program Files\GIMP-2.0\lib\gimp\\plug-ins
中重命名有问题的插件来删除它们。或者,通过重命名整个插件文件夹来删除所有插件。Some promising options from the GIMP docs (some of which you may already be using):
The GIMP FAQ:
This question on SuperUser addresses slow GIMP startup time in general and recommends:
C:\Documents and Settings\<username>\.fonts-cache1
and then opening GIMP.--verbose
and seeing where it hangs. Then remove problematic plugins by renaming them inC:\Program Files\GIMP-2.0\lib\gimp\<version>\plug-ins
. Alternately, remove all plugins by renaming the whole plugins folder.与其说是一种解决方案,不如说是未来的一种不同的可能性,但是您是否考虑过不使用 GIMP?
GIMP 首先是一个基于 GUI 的应用程序。如果您从命令行进行大量重复的图像操作,那么使用 ImageMagick 专为此类用途而设计。我不知道你的 script-fu 脚本有多复杂,也不知道它们转换为 ImageMagick 的(确实复杂)语法有多容易,但你绝对不会遇到启动时间长的问题。
Not so much a solution as a different possibility for the future, but have you considered not using GIMP?
GIMP is first and foremost a GUI-based app. If you're doing a lot of repetitive image manipulation from the command line, you might be better off with a tool like ImageMagick that's designed expressly for such use. I don't know how complex your script-fu scripts are, or how easily they could be translated to ImageMagick's (admittedly complex) syntax, but you definitely wouldn't have problems with long startup time.
您可以使用“Script-fu Server”。
图像窗口>主菜单>过滤器>脚本-fu>启动服务器。
您将看到一个弹出窗口,询问运行它的端口。同一弹出窗口上还提供了“帮助”,其中还描述了服务器使用的协议。
You could use "Script-fu Server" .
image window > Main menu > filters > script-fu > Start server.
You will be provided with a popup asking for the port to run it in. There is also "help" provided on the same popup, which also describes the protocol used by the server.