On Sun, Dec 31, 2006 at 02:27:19PM +0000, Jon Dowland wrote: > I've attached "output.txt" which identifies which graphics are > problematic. first column is graphic lump (+.gif suffix); second column > is lump width; third is lump height; fourth is the text of the lump. > > I'm now going to try and generate alternatives.
The attached script generates lumps that are nearly good enough to substitute in: I just have to make sure the palette indexes don't get mangled.
#!/bin/sh
while read line; do
set -- $line
file="$1"
width="$2"
height="$3"
shift
shift
shift
text="$*"
text=$(echo "$text" | tr a-z A-Z)
TMP1=$(mktemp)
mv "$TMP1" "$TMP1.png"
TMP1="$TMP1.png"
convert \
-resize "${width}x${height}!" \
base.png "$TMP1"
convert -fill red -font Helvetica-Bold \
-pointsize 16 \
-gravity west \
-draw "text 0,0 '$text'" \
"$TMP1" "$file"
done < output.txt
base.png
Description: PNG image
_______________________________________________ Pkg-games-devel mailing list [email protected] http://lists.alioth.debian.org/mailman/listinfo/pkg-games-devel

