The following code can be used to make a chessboard image given the number of rows and columns of the chessboard, square size in pixel, and two colors.
The default size of the square is 100 pixels and default colors are black and white.


Use an image viewer like Irfanview to print the saved chessboard pattern to a paper maintaining the required size of the chessboard in metric measurements.
As an example, if you want to print a 5×7 chessboard pattern where one square should be 3cm×3cm, select the options as follows.
