Thank you Steven. Here is what I have accomplished so far: Ok here is what I did:
I started with this set in the public domain for the SVG source https://pixabay.com/en/chess-pieces-set-symbols-game-26774/ It isn't really Merida, but is a bit "thicker" which is the only way I can describe it which makes scaleing on the smaller side work well also. Next step I broke the above SVG into its separate pieces. I then used inkscape to give each of the transparent holes in each piece a fill in color, I was a little torn here and instead of white went with a personal preference of an off white FFF6D5 color, as I am so used to club sets where the white pieces are really a lighter shade of yellow. Plus then I think the set works better with a variety of board styles / colors. For the next step after the hint from Steven! I used the script below to generate the tcl for the set with scaling from 25 - 160, as I didn't realize the pivot described had already been fixed / extended. The 160 size was the top end for sizing up scidvspc on my monitor 2560x1600. This left me with a crystal clear display of pieces from the smallest board, all the way to my max scale. No jagged edges, or scaling artifacts. In my tests I was just replacing the Merdia1 set, with this replacement in bitmaps.tcl From here: The challenge with contributing the TCL if someone wants to include it in scidvspc as an alternate set, is just naming the set (there wasn't enough info in the site above for me to know what to call it, but visually to me it looks like it was based on a variation of Merida, so I guess a Merida 3? However it scales and visually look much better than the other two, at the small and large size ends. I don't want to knock the hard work that went into making the first two, but this set could also just replace 1 or 2 as well, and only a purist font passion person would know the difference. I could also somehow share the set to be included in a pieces directory, the problem here is I still don't understand what would go in there is it tcl, a png of the set, or a set of png's for all of the different scales of the set? I can pretty much manipulate this into anything, but what I don't want to do is have it be just a singular set png, and then fidelity gets lost when scaling the board in scid again. So my next step is getting advice on what to share and in what form, if you just want to see it work I can send a replacement bitmaps.tcl where I have swapped out Merida1 with this replacement. For me personally this makes scidvspc gorgeous on the big screen so to speak. And finally now that I have all (90%) of this scripted etc, if anyone wants some other SVG source of a chess set turned into something that they can use and scales well in scidvspc, just let me know, and I can process it for you. The 10% that I still would have to do manually is if your SVG source has any transparency holes in pieces etc, but it only takes me about 15 mins to correct that. Or you can just look through the script below and roll your own. Conversion Script: #!/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 85 90 95 100 105 110 115 120 125 130 135 140 145 150 155 160" # 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 scale=$(awk "BEGIN {printf \"%.2f\", ${size}/100}") rsvg --zoom=$scale $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.png base64 $target/set-$size.png > $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 Richard On 11/27/2015 01:51 AM, Steve A wrote: >> 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. > ScidvsPC 4.15 now does things differently. It will only upscale the > smaller pieces if there is no larger image. See "proc setPieceData" > >> 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. > I haven't gone through the script, but making use of svg like this souds good. > Please send me the larger pieces if the results are good. > > Placing the new files into $HOME/.scidvspc/pieces > is probably easiest. Remove this line > set boardStyles [lrange $boardStyles 0 11] > to remove the 12 pieces limit. > S.A. ------------------------------------------------------------------------------ _______________________________________________ Scidvspc-users mailing list Scidvspc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/scidvspc-users