Implemented exporting of grid to image.