因此,我尝试运行本教程中的批处理代码:http://www.gimp.org/tutorials/Basic_Batch/
我将其复制并保存到.gimp-2.8脚本文件夹
(define (batch-unsharp-mask pattern
radius
amount
threshold)
(let* ((filelist (cadr (file-glob pattern 1))))
(while (not (null? filelist))
(let* ((filename (car filelist))
(image (car (gimp-file-load RUN-NONINTERACTIVE
filename filename)))
(drawable (car (gimp-image-get-active-layer image))))
(plug-in-unsharp-mask RUN-NONINTERACTIVE
image drawable radius amount threshold)
(gimp-file-save RUN-NONINTERACTIVE
image drawable filename filename)
(gimp-image-delete image))
(set! filelist (cdr filelist)))))并运行以下命令:
gimp-2.8 -i -b '(batch-unsharp-mask "*.png" 5.0 0.5 0)' -b '(gimp-quit 0)'但是我得到了一个错误
Error: ( : 1) eval: unbound variable: *.png这似乎不是脚本的问题;可能是我调用它的方式,或者我遗漏了一些东西,但我无法弄清楚。
发布于 2014-07-07 01:39:37
我知道这已经是漫长的四个月了,但我只是在与我写的一个笨拙的(2.8)脚本作斗争,并得到了一个反复出现的脚本
batch command experienced an execution error:
Error: ( : 32578) eval: unbound variable: while 事实证明,在匆忙合并脚本目录时,我删除了对/usr/share/gimp/2.0/scripts的引用。显然,该目录中有一些东西定义了"while“
编辑->首选项->文件夹->脚本
发布于 2015-04-29 06:52:05
让原始脚本在gimp 2.8 ubuntu 14.04中工作,只需复制并粘贴换行符就可以了。我在粘贴时遇到了问题,这样行就不会断掉,只需删除空行,因为它们是一个张贴异常。将脚本放在~/.gimp-2.9/scripts中,并使用此脚本删除雾霾作为gimp -i -b '(batch-unsharp-mask "*.JPG“100 0.3 0)‘-b '(gimp-quit 0)’
(define (batch-unsharp-mask pattern radius amount threshold)
(let* ((filelist (cadr (file-glob pattern 1))))
(while (not (null? filelist))
(let* ((filename (car filelist))
(image (car (gimp-file-load RUN-NONINTERACTIVE filename filename)))
(drawable (car (gimp-image-get-active-layer image))))
(plug-in-unsharp-mask RUN-NONINTERACTIVE image drawable radius amount threshold)
(gimp-file-save RUN-NONINTERACTIVE image drawable filename filename)
(gimp-image-delete image))
(set! filelist (cdr filelist)))))发布于 2018-03-26 04:15:32
我通过确认我的脚本的名称解决了这个错误。我从现有脚本复制了我的脚本,但名称重复。在我更新了脚本的名称之后,这个错误就消失了,一切都开始工作了。
您必须具有唯一的脚本名称,其中包括define名称
https://stackoverflow.com/questions/22212107
复制相似问题