First as I was composing this email.  Drafts might have gone to the list 
I apologize if that happened.  Thunder might have sent stuff I wasn't 
done with.


I am interested in trying to contribute a higher fidelity piece set for 
larger size boards.  Basically the TCL seems to contain as an example a 
Merdia1 set base64 encoded sizes 25 through 80 encoded gifs.

As a first attempt I rewrote the old MkScidPieces bit like below, this 
takes as input svg data source and creates much cleaner version of the 
tcl to be included in the bitmap.tcl  however two things, I would like 
to also add sizes from 85 to say for example 120, but somewhere in 
start.tcl or something like that is sort of a pivot point at size 80 
where if the board size gets greater than 80 the code flips over to 
reusing the smaller sizes.  As in not CAPPING at the largest size, but 
somehow going backwards, or to smaller sizes and then scaling them, 
which is why you get really fuzzy really quick at larger sizes.  Can 
someone explain why the pivot point at 80, and if there is a problem 
just adding all of the board size piece sizes in, and where I might stop 
the pivot behavior.  I'll dig in and find it, but I was thinking someone 
else might know.

The other questions, is I could probably extend the script below to 
automatically insert a newset into bitmaps.tcl rather than replacing one 
like I am now.  Would others be interested in a script that basically 
finished from beginning to end.

And finally, I saw some stuff that I haven't traced in the tcl, about a 
user piecedirectory, etc, it might be more appropriate for me to have 
the script target there, is there any documentation on directory, or 
format, that this would take.

R

#!/bin/sh

setname="Merida1"

input="$HOME/newset"
target="$HOME/newset"
temp="$HOME/newset/temp"

# svg source files are file name format ColorPiece.svg ie WhiteKnight.svg
colors="Black White"
pieces="Pawn Knight Bishop Rook Queen King"
sizes="25 30 35 40 45 50 55 60 65 70 75 80"

# remove output file if still there from a prior run
rm -f $target/$setname-inc-into-bitmaps.tcl

for size in $sizes
do
     for color in $colors
     do
         for piece in $pieces
         do
             rsvg -w $size -h $size $input/$color$piece.svg 
$temp/$color$piece-$size.png
             # rsvg does much better quality installed with - sudo 
apt-get install librsvg2-bin
             # however convert from imagemagik could also be used this 
worked for me but again the
             # aliasing both with -antialias and +antialias never worked 
well for me also tried
             # scaling with -density $size but still poor quality.
             # convert -size "$size"x"$size" $input/$color$piece.svg 
-transparent white $temp/$color$piece-$size.png
         done
           montage -geometry "$size"x"$size+0+0" -background transparent 
-tile 6x1 \
              $temp/${color}Pawn-$size.png 
$temp/${color}Knight-$size.png $temp/${color}Bishop-$size.png \
              $temp/${color}Rook-$size.png $temp/${color}Queen-$size.png 
$temp/${color}King-$size.png \
              $temp/${color}-$size.png
     done
     montage -geometry "$(($size * 6))"x"$size+0+0" -background 
transparent -tile 2x1 \
         $temp/White-$size.png $temp/Black-$size.png \
         $target/set-$size.gif
     base64 $target/set-$size.gif > $temp/set-$size.64
     sed -i "1s/^/set pieceImageData($setname,$size) {\n/" 
$temp/set-$size.64
     echo "}" >> $temp/set-$size.64
     cat $temp/set-$size.64 >> $target/$setname-inc-into-bitmaps.tcl
done

------------------------------------------------------------------------------
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741551&iu=/4140
_______________________________________________
Scidvspc-users mailing list
Scidvspc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scidvspc-users

Reply via email to