modify the v_gap and h_gap of images