2014-03-05 24 views
3

錯誤所以我試圖從本教程運行批處理代碼: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 

這似乎不是腳本的問題;可能是我打電話給我的方式,或者我錯過了一些東西,但我無法弄清楚。

+1

此頁面沒有提供的答案來修復這個問題規定錯誤.......... 錯誤:(1)EVAL:未綁定變量:* .PNG –

回答

2

我知道它已經四個月之久,但我只是用我寫了一個瘸子(2.8)腳本戰鬥並獲得重複

batch command experienced an execution error: 
Error: (: 32578) eval: unbound variable: while 

事實證明,我在匆忙鞏固腳本目錄,我刪除了/usr/share/gimp/2.0/scripts的引用。顯然有什麼東西在該目錄定義「而」

編輯 - >首選項 - >文件夾 - >腳本

1

得到了原劇本在GIMP工作2.8 Ubuntu的14.04lts就不得不復制並粘貼換行符回一起。我在粘貼時遇到了麻煩,所以線條沒有斷開,只是刪除空行,因爲它們是張貼異常。將腳本放置在〜/ .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)))))