Fixed layout  for square frames
Added function when retake photo