Save images sorted by rows