
我創建了腳本在Windows中使用Gimp批次將影像轉換為其他格式由@forrest-voight 提供的提示。誰能告訴我如何在這個腳本中新增選項,以便立即應用每個檔案的最大壓縮 (9)?
腳本 。供應鏈管理:
(define (myconvert in_filename out_filename)
(let* (
(image (car (gimp-file-load RUN-NONINTERACTIVE in_filename in_filename)))
(drawable (car (gimp-image-get-active-layer image)))
)
(gimp-file-save RUN-NONINTERACTIVE image drawable out_filename out_filename)
(gimp-image-delete image)
)
)
終端命令:
for A in * ; do gimp -i -b "(myconvert \"$A\" \"$A.jpg\")" -b '(gimp-quit 0)' ; done
答案1
假設您嘗試匯出為 PNG,請使用檔案-png-保存或者檔案-png-save2代替gimp 檔案保存顯然,您必須相應地設定所有參數。