run.cpp, img->im