Switch to using 64x64 png images
authorH.G. Muller <h.g.muller@hccnet.nl>
Fri, 5 Oct 2012 08:41:02 +0000 (10:41 +0200)
committerH.G. Muller <h.g.muller@hccnet.nl>
Sun, 21 Oct 2012 09:28:12 +0000 (11:28 +0200)
The bitmap scaling works better when the needed factors are not too large,
as the svg rendering's anti-aliasing did not blur more than 1 pixel.
So after shrinking too much the images are not effectively anti-aliased
anymore.

65 files changed:
png/BlackAdvisor.png
png/BlackArchbishop.png
png/BlackBishop.png
png/BlackCanon.png
png/BlackChancellor.png
png/BlackCobra.png
png/BlackCommoner.png
png/BlackCrownedBishop.png
png/BlackCrownedRook.png
png/BlackElephant.png
png/BlackGold.png
png/BlackGoldKnight.png
png/BlackGoldLance.png
png/BlackGoldPawn.png
png/BlackGoldSilver.png
png/BlackHawk.png
png/BlackKing.png
png/BlackKnight.png
png/BlackLance.png
png/BlackMarshall.png
png/BlackNightrider.png
png/BlackPawn.png
png/BlackPrincess.png
png/BlackQueen.png
png/BlackRook.png
png/BlackUnicorn.png
png/DarkSquare.png
png/LightSquare.png
png/NeutralSquare.png
png/WhiteAdvisor.png
png/WhiteArchbishop.png
png/WhiteBishop.png
png/WhiteCanon.png
png/WhiteChancellor.png
png/WhiteCobra.png
png/WhiteCommoner.png
png/WhiteCrownedBishop.png
png/WhiteCrownedRook.png
png/WhiteElephant.png
png/WhiteGold.png
png/WhiteGoldKnight.png
png/WhiteGoldLance.png
png/WhiteGoldPawn.png
png/WhiteGoldSilver.png
png/WhiteHawk.png
png/WhiteKing.png
png/WhiteKnight.png
png/WhiteLance.png
png/WhiteMarshall.png
png/WhiteNightrider.png
png/WhitePawn.png
png/WhitePrincess.png
png/WhiteQueen.png
png/WhiteRook.png
png/WhiteUnicorn.png
png/eo_Analyzing.png
png/eo_Black.png
png/eo_Clear.png
png/eo_Ponder.png
png/eo_Thinking.png
png/eo_Unknown.png
png/eo_White.png
png/icon_black.png
png/icon_white.png
xboard.c

index 9be3bde..604ed17 100644 (file)
Binary files a/png/BlackAdvisor.png and b/png/BlackAdvisor.png differ
index ea8673d..983054c 100644 (file)
Binary files a/png/BlackArchbishop.png and b/png/BlackArchbishop.png differ
index 22bdd78..eb7b7f0 100644 (file)
Binary files a/png/BlackBishop.png and b/png/BlackBishop.png differ
index 9a9f2a4..437000b 100644 (file)
Binary files a/png/BlackCanon.png and b/png/BlackCanon.png differ
index 83c0314..eeb7a82 100644 (file)
Binary files a/png/BlackChancellor.png and b/png/BlackChancellor.png differ
index 0648c54..35f1ade 100644 (file)
Binary files a/png/BlackCobra.png and b/png/BlackCobra.png differ
index 42d7fb9..25801f2 100644 (file)
Binary files a/png/BlackCommoner.png and b/png/BlackCommoner.png differ
index fab1810..e808b4c 100644 (file)
Binary files a/png/BlackCrownedBishop.png and b/png/BlackCrownedBishop.png differ
index b8589eb..c338bb4 100644 (file)
Binary files a/png/BlackCrownedRook.png and b/png/BlackCrownedRook.png differ
index f967181..a32742a 100644 (file)
Binary files a/png/BlackElephant.png and b/png/BlackElephant.png differ
index 4af913d..8f45faa 100644 (file)
Binary files a/png/BlackGold.png and b/png/BlackGold.png differ
index e4c6761..c3f3c60 100644 (file)
Binary files a/png/BlackGoldKnight.png and b/png/BlackGoldKnight.png differ
index 1430470..37d5f54 100644 (file)
Binary files a/png/BlackGoldLance.png and b/png/BlackGoldLance.png differ
index 8f434a2..c368ee6 100644 (file)
Binary files a/png/BlackGoldPawn.png and b/png/BlackGoldPawn.png differ
index cbf79aa..f2c5a50 100644 (file)
Binary files a/png/BlackGoldSilver.png and b/png/BlackGoldSilver.png differ
index 635d3cb..accaadd 100644 (file)
Binary files a/png/BlackHawk.png and b/png/BlackHawk.png differ
index 6dacc3c..2a2f28b 100644 (file)
Binary files a/png/BlackKing.png and b/png/BlackKing.png differ
index 6ca14c2..28d6818 100644 (file)
Binary files a/png/BlackKnight.png and b/png/BlackKnight.png differ
index 7ead46a..adc840e 100644 (file)
Binary files a/png/BlackLance.png and b/png/BlackLance.png differ
index 53c716c..5158c56 100644 (file)
Binary files a/png/BlackMarshall.png and b/png/BlackMarshall.png differ
index 0a99e3b..72b9b4a 100644 (file)
Binary files a/png/BlackNightrider.png and b/png/BlackNightrider.png differ
index 213369c..b8e4a87 100644 (file)
Binary files a/png/BlackPawn.png and b/png/BlackPawn.png differ
index f7f4645..238532a 100644 (file)
Binary files a/png/BlackPrincess.png and b/png/BlackPrincess.png differ
index f44f6ae..2c760da 100644 (file)
Binary files a/png/BlackQueen.png and b/png/BlackQueen.png differ
index 80e10d0..42ac028 100644 (file)
Binary files a/png/BlackRook.png and b/png/BlackRook.png differ
index ef915b5..1e577ad 100644 (file)
Binary files a/png/BlackUnicorn.png and b/png/BlackUnicorn.png differ
index 9323ca2..2a323b8 100644 (file)
Binary files a/png/DarkSquare.png and b/png/DarkSquare.png differ
index 1e4703d..b444e0d 100644 (file)
Binary files a/png/LightSquare.png and b/png/LightSquare.png differ
index b5e94d9..eba0860 100644 (file)
Binary files a/png/NeutralSquare.png and b/png/NeutralSquare.png differ
index 41861dc..cf1f4cf 100644 (file)
Binary files a/png/WhiteAdvisor.png and b/png/WhiteAdvisor.png differ
index 09c4530..28259e0 100644 (file)
Binary files a/png/WhiteArchbishop.png and b/png/WhiteArchbishop.png differ
index 540611c..b2c1980 100644 (file)
Binary files a/png/WhiteBishop.png and b/png/WhiteBishop.png differ
index 5f19f7b..20d5655 100644 (file)
Binary files a/png/WhiteCanon.png and b/png/WhiteCanon.png differ
index 66e50dc..2cc3f57 100644 (file)
Binary files a/png/WhiteChancellor.png and b/png/WhiteChancellor.png differ
index fbe592d..1b29df7 100644 (file)
Binary files a/png/WhiteCobra.png and b/png/WhiteCobra.png differ
index 267e610..abdab67 100644 (file)
Binary files a/png/WhiteCommoner.png and b/png/WhiteCommoner.png differ
index fac4d94..ee28c21 100644 (file)
Binary files a/png/WhiteCrownedBishop.png and b/png/WhiteCrownedBishop.png differ
index e593b58..beeb2f2 100644 (file)
Binary files a/png/WhiteCrownedRook.png and b/png/WhiteCrownedRook.png differ
index b13b561..dbacd3f 100644 (file)
Binary files a/png/WhiteElephant.png and b/png/WhiteElephant.png differ
index 0229c1c..e0446ea 100644 (file)
Binary files a/png/WhiteGold.png and b/png/WhiteGold.png differ
index b986968..9a81fe3 100644 (file)
Binary files a/png/WhiteGoldKnight.png and b/png/WhiteGoldKnight.png differ
index 60e1e31..b6ebc40 100644 (file)
Binary files a/png/WhiteGoldLance.png and b/png/WhiteGoldLance.png differ
index 180b61c..ab19e36 100644 (file)
Binary files a/png/WhiteGoldPawn.png and b/png/WhiteGoldPawn.png differ
index edf4221..553773f 100644 (file)
Binary files a/png/WhiteGoldSilver.png and b/png/WhiteGoldSilver.png differ
index f1b09d9..bafc079 100644 (file)
Binary files a/png/WhiteHawk.png and b/png/WhiteHawk.png differ
index a711693..1384044 100644 (file)
Binary files a/png/WhiteKing.png and b/png/WhiteKing.png differ
index 13460e9..fcd55b0 100644 (file)
Binary files a/png/WhiteKnight.png and b/png/WhiteKnight.png differ
index a3030f1..926a1ed 100644 (file)
Binary files a/png/WhiteLance.png and b/png/WhiteLance.png differ
index bf933e2..4150dfe 100644 (file)
Binary files a/png/WhiteMarshall.png and b/png/WhiteMarshall.png differ
index 911dfd7..0d806c7 100644 (file)
Binary files a/png/WhiteNightrider.png and b/png/WhiteNightrider.png differ
index 5d52c87..39a58a6 100644 (file)
Binary files a/png/WhitePawn.png and b/png/WhitePawn.png differ
index 72c2d2f..d9e8054 100644 (file)
Binary files a/png/WhitePrincess.png and b/png/WhitePrincess.png differ
index d22ddc6..5b5972a 100644 (file)
Binary files a/png/WhiteQueen.png and b/png/WhiteQueen.png differ
index ad55e03..bf889e7 100644 (file)
Binary files a/png/WhiteRook.png and b/png/WhiteRook.png differ
index 9ad6b92..87414c6 100644 (file)
Binary files a/png/WhiteUnicorn.png and b/png/WhiteUnicorn.png differ
index 656e34a..72ffdbb 100644 (file)
Binary files a/png/eo_Analyzing.png and b/png/eo_Analyzing.png differ
index 9a0b226..8e7d5ff 100644 (file)
Binary files a/png/eo_Black.png and b/png/eo_Black.png differ
index a3b26fa..880db76 100644 (file)
Binary files a/png/eo_Clear.png and b/png/eo_Clear.png differ
index 143bab9..cf8913e 100644 (file)
Binary files a/png/eo_Ponder.png and b/png/eo_Ponder.png differ
index eaf1f5a..66abe2c 100644 (file)
Binary files a/png/eo_Thinking.png and b/png/eo_Thinking.png differ
index 139f3c0..6a87941 100644 (file)
Binary files a/png/eo_Unknown.png and b/png/eo_Unknown.png differ
index 6d4b444..913dbd4 100644 (file)
Binary files a/png/eo_White.png and b/png/eo_White.png differ
index 464e762..840b5ea 100644 (file)
Binary files a/png/icon_black.png and b/png/icon_black.png differ
index 8e7cb31..bb01345 100644 (file)
Binary files a/png/icon_white.png and b/png/icon_white.png differ
index 49ab155..55655a5 100644 (file)
--- a/xboard.c
+++ b/xboard.c
@@ -2249,7 +2249,7 @@ ScaleOnePiece (char *name, int color, int piece)
     pngPieceImages[color][piece] = img = cairo_image_surface_create_from_png (buf);
     w = cairo_image_surface_get_width (img);
     h = cairo_image_surface_get_height (img);
-    if(w != 256 || h != 256) { printf("Bad png size %dx%d in %s\n", w, h, buf); exit(1); }
+    if(w != 64 || h != 64) { printf("Bad png size %dx%d in %s\n", w, h, buf); exit(1); }
   }
 
   // create new bitmap to hold scaled piece image (and remove any old)
@@ -2258,7 +2258,7 @@ ScaleOnePiece (char *name, int color, int piece)
   if(piece <= WhiteKing) pngPieceBitmaps[color][piece] = cs;
   // scaled copying of the raw png image
   cr = cairo_create(cs);
-  cairo_scale(cr, squareSize/256., squareSize/256.);
+  cairo_scale(cr, squareSize/64., squareSize/64.);
   cairo_set_source_surface (cr, img, 0, 0);
   cairo_paint (cr);
   cairo_destroy (cr);