/*Be sure you have allocated the colors in the grid or change them to colors you have allocated. You can change the height and width and pixel size of the squares for locating coordinates better...Thanks Dave*/ //GRID $wd = 300; $ht = 300; $pixel = 20; $grid_color = imagecolorallocate($im, 255, 255, 255); for ($x = 0; $x < $wd; $x = $x + $pixel) imageline($im, $x, 0, $x, $ht, $grid_color); for ($y = 0; $y < $ht; $y = $y + $pixel) imageline($im, 0, $y, $wd, $y, $grid_color);