消えゆく世界と流れる未来に最後の灯を since 2006/4/3
[PR]上記の広告は3ヶ月以上新規記事投稿のないブログに表示されています。新しい記事を書く事で広告が消えます。
ただいまコメントを受けつけておりません。
#!/bin/bash
for x in "$@"
do
echo "converting $x..."
convert "$x" -channel RGB -negate temp.jpg
gimp -i -b '(batch-auto-fix "temp.jpg" 5.0 0.5 0)' -b '(gimp-quit 0)'
convert temp.jpg -type GrayScale "_$x"
done
rm temp.jpg
(define (batch-auto-fix 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-levels-stretch drawable)
(plug-in-color-enhance RUN-NONINTERACTIVE
image drawable)
(gimp-file-save RUN-NONINTERACTIVE
image drawable filename filename)
(gimp-image-delete image))
(set! filelist (cdr filelist)))))