public static void makeAllPieces() {  // Make an image showing all the pieces in all postions
      BufferedImage icons = new BufferedImage(9*56,12*56,BufferedImage.TYPE_INT_RGB);
      Graphics g = icons.getGraphics();
      g.setColor(Color.white);
      g.fillRect(0,0,9*56,12*56);
      g.setColor(Color.black);
      g.drawRect(0,0,9*56-1,12*56-1);
      int y = 10;
      int x = 56;
      int current_piece = 1;
      g.setColor(Color.black);
      g.drawString("0",20,35);
      for (int i = 0; i < piece_data.length; i++) {
         int[] piece = piece_data[i];
         if (piece[0] > current_piece) {
            y += 56;
            x = 56;
            g.setColor(Color.black);
            g.drawString(""+i,20,y+20);
            current_piece = piece[0];
         }
         if (i == 1)
            x += 10;  // Move vertical "I" pentomino over 20 pixels.
         int mincol = 0;
         for (int j = 2; j < 8; j += 2)
            if (piece[j] < mincol)
               mincol = piece[j];
         g.setColor(pieceColor[piece[0]]);
         g.fillRect(x-mincol*10+3,y,10,10);
         g.setColor(Color.black);
         g.drawRect(x-mincol*10+3,y,10,10);
         for (int j = 1; j < 8; j += 2) {
            g.setColor(pieceColor[piece[0]]);
            g.fillRect(x+(-mincol+piece[j+1])*10+3,y+piece[j]*10,10,10);
            g.setColor(Color.black);
            g.drawRect(x+(-mincol+piece[j+1])*10+3,y+piece[j]*10,10,10);
         }
         x += 56;
      }
      doSaveImage(icons,"all_pieces");
      System.out.println("Done");
   }