Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2005:
[Freeciv-Dev] (PR#13806) Art: Package of resized flag
Home

[Freeciv-Dev] (PR#13806) Art: Package of resized flag

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: himasaram@xxxxxxxx
Subject: [Freeciv-Dev] (PR#13806) Art: Package of resized flag
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 29 Aug 2005 08:09:49 -0700
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=13806 >

...and the patch.
Index: data/flags/convert_png
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/flags/convert_png,v
retrieving revision 1.3
diff -p -u -r1.3 convert_png
--- data/flags/convert_png      28 Apr 2005 03:53:45 -0000      1.3
+++ data/flags/convert_png      29 Aug 2005 15:06:26 -0000
@@ -8,7 +8,8 @@ RENDERER="inkscape"
 
 # Target width: 28 for trident/isotrident (height is then calculated
 # automatically).
-TARGET_WIDTH=28
+TARGET_WIDTH=26
+TARGET_HEIGHT=18
 
 SHIELD_WIDTH=13
 SHIELD_HEIGHT=13
@@ -30,13 +31,15 @@ for file0 in $files; do
   # This is actually necessary for rendering
   rm -f $file1 $file2 $file3 $file4
 
-  $RENDERER -f "$file0" -w $(($TARGET_WIDTH - 2)) -e "$file1" >/dev/null
+  $RENDERER -f "$file0" -w $(($TARGET_WIDTH - 2)) -h $(($TARGET_HEIGHT - 2)) 
-e "$file1" >/dev/null
 
   # Ugly way to determine width and height.  There must be a better way!
   SIZE=`identify "$file1" | sed "s/^.*PNG //" | sed "s/ .*\$//"`
   WIDTH=`echo $SIZE | sed "s/x.*\$//"`
   HEIGHT=`echo $SIZE | sed "s/^.*x//"`
 
+  echo "$WIDTH x $HEIGHT"
+
   # This complicated code puts a 1-pixel black border around the image.
   convert -resize $((2*$WIDTH))x$((2*$HEIGHT)) -fill black -draw "rectangle 
0,0 $((2*$WIDTH)),$((2*$HEIGHT))" $file1 $file2
   convert -crop $((2+$WIDTH))x$((2+$HEIGHT))+0x0 $file2 $file3

[Prev in Thread] Current Thread [Next in Thread]