MoveImage function to move the image