When we had this thread starting on 2004/5/18, I suggested to make
"transparent" regions white and then to use "convert -transparent white".
Roy suggested to use Gimp's "color to alpha" filter. Indeed, this filter
gives much better results, but it was a pain to use interactively.

Now I wrote this little script ("trans-white") to let gimp cut out
white parts non-interactively. Of course, other colors ccould be used,
too (e.g. ugly pink). Parts that should remain white and non-transparent
can still be colorized 254/254/254 (-> white enough :-).



#!/bin/bash

if [ $# != 2 ]; then
    echo "USAGE: `basename $0` <infile> <outfile>"
    exit 0
fi

INFILE=$1
OUTFILE=$2

cat <<-EOF |gimp -i -c -d -f -b -
    (let*
        (
            (img (car (gimp-file-load 1 "$INFILE" "$INFILE")))
            (drawable (car (gimp-image-active-drawable img)))
        )
        (plug-in-colortoalpha 1 img drawable '(255 255 255))
        (gimp-file-save 1 img drawable "$OUTFILE" "$OUTFILE")
    )
    (gimp-quit 0)
EOF


_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d

Reply via email to