Skip to content

Instantly share code, notes, and snippets.

@jeesay
Created August 12, 2011 09:35
chessboard_v1_imagej.ijm
// ImageJ script to create a 512x512 chessboard
// Jean-Christophe Taveau
cellSize=64;
newImage("chess", "RGB Black", 8*cellSize, 8*cellSize, 1);
setColor(255,255,255);
for (y=0;y<8;y++)
{
for (x=0;x<8;x++)
{
if ((x+y)%2==0) {
fillRect(x*cellSize,y*cellSize,cellSize,cellSize);
}
}
}
exit();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment