${HOME}/.gimp/scripts/ に置きます。 インタラクティブモードで 「拡張」→「Script-fu」→「Misc」のところにも見付かるはず。 もちろん、バッチ処理を意図して作ったんですが。
; scale48 -- 画像ファイルを 48x48 の大きさに Scale (拡大または縮小) してから、 ; png 形式で保存します。可視レイヤーは統合されます。 ; ; USAGE: gimp -i -b '(scale48 "hoge.xcf" "hoge.png")' ; Memo: ; Script-fu で呼べる関数の仕様などは、 ; GIMP のメニューバーの「拡張」→「DB Browser」で確認できます。 (define (scale48 inFile outFile) (set! img (car (gimp-file-load 1 inFile inFile))) ; ファイル読み込み (gimp-image-merge-visible-layers img 0) ; 可視レイヤーの統合 (gimp-image-scale img 48 48) ; Scale (set! drawable (car (gimp-image-active-drawable img))) ; drawable の獲得 ; セーブ (file-png-save 1 ; run_mode, 0:interactive,1:non-interactive img ; Input image drawable ; drawable to save outFile ; filename outFile ; raw_filename 0 ; Use Adam7 interlacing? 9 ; Compress factor (0-9) 大きいほど高圧縮 0 ; bkGD 0 ; gAMA 0 ; oFFs 0 ; pHYs 0) ; tIME (gimp-quit 0)) ; Register this script-fu. (script-fu-register "scale48" _"<Toolbox>/Xtns/Script-Fu/Misc/scale48" "Scale image to 48x48 and save as PNG." "UNNO Hideyuki" "Copyright 2008 (c) UNNO Hideyuki" "2008-03-25" "" SF-VALUE "Infile" "\"sample.xcf\"" SF-VALUE "Outfile" "\"sample.png\"" )