modify gengrid_default.c for image path, by wulin