Charge sharing of single photons in finely segmented pixel detectors